I am currently working on a Visual Basic 2005 Express project, and wish to connect to SQL Server 2005 Express for the data tables. However it is not letting me connect. I do not have a user name or password specifically set up under SQL Server, it is just going in with Windows authentication (DAVE\SQLEXPRESS). I have attempted to set up an application setting in the VB project to get the connection string, I browsed for and found the mdf file. The connection string's value is showing as:
Source=.\SQLEXPRESS;AttachDbFilename="C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\Customer MI.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True
However when I try to test the connection with SQL Server open, it brings up the error - Cannot open user default database. Login failed. Login failed for user 'DAVE\David'.
Does anyone know why it would be doing this and how to get it to connect properly? I have not activated any fancy settings or anything, I just want to link VB 2005 Express with SQL Server 2005 Express.
Source=.\SQLEXPRESS;AttachDbFilename="C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\Customer MI.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True
However when I try to test the connection with SQL Server open, it brings up the error - Cannot open user default database. Login failed. Login failed for user 'DAVE\David'.
Does anyone know why it would be doing this and how to get it to connect properly? I have not activated any fancy settings or anything, I just want to link VB 2005 Express with SQL Server 2005 Express.