I am using SQL Management Studio Express and Visual Studio 2008.

I have this string used for accessing the database for the system I have:

Public constring As String = "Driver={SQL Server}; Server=MyName-PC; Database=RBMonDB; uid=; Pwd=;"

This string is stuck on one PC. So I thought of creating a generic string for the Server. I triedusing "Server=./SQLEXPRESS" , "Server=localhost" but to no avail.

I even tried "Server=.". It worked but only once. Plus, someone told me that using "." is not recommended.

My classmate had a string using "Server=./SQLEXPRESS" and it works for them. Did I set-up SQL Express in a wrong way? I am still a newbie when it comes to database connection. I hope you understand. Thank you.

I think your problem is remote sharing for your project. I encountered that problem before and after a lot of research, SQL express is not recommended for remote connection, better use SQL enterprise edition.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.