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.
| Author |
Topic |
|
Indra_G
Starting Member
13 Posts |
Posted - 2012-03-04 : 21:26:24
|
| OK, so far I only use sql server 2005 with VB 2005 in a single computer. The connection string for the sql server starts with "Data Source=localhost\sqlexpress;". Now, I want to add a client to that computer (which will act as the server). Both of them will run with Windows XP. The server computer name is: "Serv1", the client computer name is : "Client1". What should I put for the Data Source in the client computer? Would "Data Source=\\Serv1\localhost\sqlexpress;" do? Or "Data Source=Serv1\sqlexpress;"?I am much used to Access database, where the data source is simply the location of the database file, and that folder must be shared, which is different from SQL Server, of course. Due to that, I am also confused, which folder of the server that should be shared if we run SQL Server as above? Or, is it the remote access that need to be changed? Is the remote access of the SQL Server itself that needed to be changed? Or the Windows XP? Or both?Software Akuntansihttp://intrikhidupit.blogspot.com/ |
|
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2012-03-05 : 08:45:19
|
| You should use Serv1\SqlExpress. Take a look at this page for various connection string formats: http://connectionstrings.com/sql-server-2005You will also need to enable remote connections on the server. That is in the Surface Area Configuration tool in the SQL 2005 program group -> configuration tools. |
 |
|
|
Indra_G
Starting Member
13 Posts |
Posted - 2012-03-05 : 19:42:24
|
| Dear Sunitabeck,I actually do use that website, :). I just not quite sure how the syntax should actually be for my case. Thank you so much...Software Akuntansihttp://intrikhidupit.blogspot.com/ |
 |
|
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2012-03-05 : 20:33:10
|
Your connection string would be one of the following, depending on whether you have SQL authentication or Windows authentication.Data Source=Serv1\SqlExpress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;Data Source=Serv1\SqlExpress;Initial Catalog=myDataBase;Integrated Security=SSPI; Alternatively, from Visual Studio, View->Server Explorer->Data connections -> Add connection. It will show you a dialog where you can type in your server name. Again, you should type Serv1\SqlExpress |
 |
|
|
Indra_G
Starting Member
13 Posts |
Posted - 2012-03-12 : 22:11:55
|
| Sorry for late reply, have been a bit out of internet until now. Thank you so much...Software Akuntansihttp://intrikhidupit.blogspot.com/ |
 |
|
|
|
|
|
|
|