|
-
Jul 29th, 2009, 04:18 AM
#1
Thread Starter
Junior Member
save into server
i have two computers network connected....one is com1 and other is com2...
i m using com1..if i save then i want to store in only in com2..and when i open from another computer the database frm com2 should be displayed from com1...
Code:
Dim cn As New SqlConnection("server=localhost;database=attendance1;uid=sa;password=;")
i think just the declaration would do that...but i m not doint that...can anyone help me..thanks
-
Jul 29th, 2009, 04:27 AM
#2
Re: save into server
I really doesn't understand what you're saying?!
Rate People That Helped You
Mark Thread Resolved When Resolved
-
Jul 29th, 2009, 04:42 AM
#3
Thread Starter
Junior Member
Re: save into server
i m using com1...if i use program from com2 then i dn get the record saved from com1...
-
Jul 29th, 2009, 04:57 AM
#4
Re: save into server
As the name suggests, when you specify "localhost" as the server you are referring to the local machine. If you want to refer to a SQL Server instance on a different machine then you have to specify the name of that machine as the server in h the connection string.
-
Jul 29th, 2009, 04:59 AM
#5
Re: save into server
You're saying that you'll have an application in several machines, and when you save the data in one of them, that data will be available for everyone?
If it's that, the connection string can't be refered as localhost, it must be something like this:
VB.NET Code:
Data Source=IP\SQLINSTANCENAME;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
Rate People That Helped You
Mark Thread Resolved When Resolved
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|