Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Multi-User with SQL Server Express?

Author  Topic 

viperbyte
Posting Yak Master

132 Posts

Posted - 2011-07-07 : 16:48:47
Hi guys. I'm not sure if I should be posting this question on a forum like this or some other site. Can SQL Server Express be used for multi users? And if so, how do I write the connection string in the application that I'm about to start using vb for this type of system?

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2011-07-07 : 16:58:31
Yes.

If using integrated security, connection string will look like this:

Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=your_database;Data Source=servername\instancename

If using SQL Authentication:

Provider=SQLNCLI.1;Password=password;Persist Security Info=True;User ID=loginname;Initial Catalog=your_database;Data Source=servername\instancename
Go to Top of Page

viperbyte
Posting Yak Master

132 Posts

Posted - 2011-07-07 : 17:14:56
This is a freelance project that I'm about to do. Do you know of a way that I can get the severname\instancename? How do I ask the user for this info? Or should I do it programmaticaly? If this is out of scope for this forum my apologies and I'll bug some other ppl. Thank you very much for you your help russell!
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2011-07-07 : 20:35:44
Should be something close to "servername\SQLExpress" (without the quotes)

But it can be renamed upon installation. Guess you could do it programatically. If you're handling the installation(s), you'll just need to make it uniform.
Go to Top of Page

viperbyte
Posting Yak Master

132 Posts

Posted - 2011-07-07 : 23:57:49
Thanks for the help :)
Go to Top of Page
   

- Advertisement -