I've constructed an inventory program that relies on a database for information. Previously, I've used Access 2007, because it is easy and n00b friendly. Unfortunately, I'm not so sure Access can handle the requirements (Multiple simultaneous users over a LAN connection). So I switched to SQL Server 2005 Express. And things went downhill from there.
I wrote my program in such a way that it would read the connection string from an .ini file. It has no problems locating the .ini file, but upon trying to connect to the database, it always fails.
The latest error goes something like this:
"A network-related or instance-specific error has occured while establishing a connection to SQL Server."
And this is the code I used for it:
integrated security=SSPI;data source=LANCE-PC\SQLEXPRESS\dbaseAIS;Initial Catalog=dBaseAIS;Integrated Security=True;persist security info=False;User ID=Lance;Password=********
I am assuming that something is wrong with the User ID and the Password (the Username I log on to, and the Password to my account in Windows 7, respectively). But I'm not sure how to fix it. This is the closest I got to actually getting to the Database. Using alternative codes such as this:
data source=LANCE-PC\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|dbaseAIS.mdf;User Instance=true
Would get me a Database does not exist or database not found error, or something to that effect.
Could anyone help me with this please? I'm new at SQL.
Edited 5 Years Ago by zack_falcon: n/a