I am working on an application to store documents in a FILESTREAM database. I have created the database and I have inserted a few records into this database using an SQL query. But for some reason I cannot open the database in a Visual Basic application to even get started to manipulate the data. Here is the code, I have used this basic code in several other applications, and it works fine: Imports System.Data.SqlClient Imports System.Drawing Imports System.IO Module Program Sub Main() 'Create a connection to the database Dim ConStr As String = "Data Source=DESKTOP-UAB5C74\SQLEXPRESS; Initial Catalog=I:\MyFileCabinet\MyFileCabinet; Integrated Security=True" 'Create a new SQLConnection Dim con As New SqlConnection(ConStr) 'Open Database with error catching Try con.Open() Catch ex As Exception Console.WriteLine("Open Error" + ex.Message) Exit Sub End Try Console.WriteLine("File Opened") 'Cleanup con.Close() End Sub End Module When I debug the application, I get the following error: "Open error, cannot open database "I:\MyFileCabinet\MyFileCabinet" requested by the login The login failed for user ‘DESKTOP-UAB5C74\Brown’"
I have made sure that user ‘DESKTOP-UAB5C74\Brown’ is the owner of the .dbf file and the log file, and that user has full rights to these files. I have checked database properties to be sure the connection string was correct. I have no idea where to go from here, any help would be greatly appreciated.
Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)