Hi,
I have tried to read around this for literally weeks and I have hit a complete block in my progress!
I am using Visual Basic 2010 Express to build an application which should connect to a SQL server, I have followed the connection wizard exactly and I cannot get the file to make a connection to the database.
I am running Microsoft SQL Server Management Studio 2012 and have created a table called TestingDatabase, the .mdf file is located C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS2012\MSSQL\DATA (also with the _Log file).
When I follow the Visual Basic connection wizard to begin with I go through and select My SQL Server Database file (SQL Client) and then point it to my .mdf file, however on first attempt it says that I don't have admin permissions, so by right clicking the file and changing the permissions to allow for my specific user (despite the fact that I'm logged on the Admin user account anyway) I'm now getting a message telling me that the file is already in use. I've tried running it just on it's own and it still won't make a connection.
My Microsoft SQL Server Management Studio is always on and I'm not running any other programs which could be connected to it in the back ground. If I connect excel to the database I have no problems whatsoever with the connection, it just doesn't like to connect through VB.net.
I am at a complete loss and highly frustrated with this problem so I would be eternally grateful if someone could help me sort out this problem.
Many thanks
Maudise
I have tried to read around this for literally weeks and I have hit a complete block in my progress!
I am using Visual Basic 2010 Express to build an application which should connect to a SQL server, I have followed the connection wizard exactly and I cannot get the file to make a connection to the database.
I am running Microsoft SQL Server Management Studio 2012 and have created a table called TestingDatabase, the .mdf file is located C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS2012\MSSQL\DATA (also with the _Log file).
When I follow the Visual Basic connection wizard to begin with I go through and select My SQL Server Database file (SQL Client) and then point it to my .mdf file, however on first attempt it says that I don't have admin permissions, so by right clicking the file and changing the permissions to allow for my specific user (despite the fact that I'm logged on the Admin user account anyway) I'm now getting a message telling me that the file is already in use. I've tried running it just on it's own and it still won't make a connection.
My Microsoft SQL Server Management Studio is always on and I'm not running any other programs which could be connected to it in the back ground. If I connect excel to the database I have no problems whatsoever with the connection, it just doesn't like to connect through VB.net.
I am at a complete loss and highly frustrated with this problem so I would be eternally grateful if someone could help me sort out this problem.
Many thanks
Maudise