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
 how to connect to sql server database from another

Author  Topic 

drvb1989
Starting Member

3 Posts

Posted - 2006-06-21 : 13:29:21
HI
i have 2 computers in my home names PC1,PC2 .
i have database sql server 2000 in pc1 named Books , i want to connect to this database from pc2 .
note : i am used visual basic.net 2003
if any one have books or articales about this subject please i want help quickly

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-06-21 : 14:02:47
You are going to need to purchase a book. Any VB.NET book that deals with ADO should do just fine. But this should get your started:

Imports System.Data.SqlClient

Dim cnSql As New SqlConnection
Dim connStr As String
connStr = "Need to put your connection string here...see www.connectionstrings.com for how to do it"
cnSql.ConnectionString = connStr
cnSql.Open()
'Do something here
cnSql.Close()

Your question is more related to programming in Visual Basic rather than a specific SQL Server question, so you might want to try a forum that deals with VB.NET such as [url]www.asp.net[/url].

Tara Kizer
aka tduggan
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2006-06-21 : 18:26:25
hiya,
there is a forum dedicated to .net here

http://www.sqlteam.com/forums/forum.asp?FORUM_ID=17

Afrika
Go to Top of Page

drvb1989
Starting Member

3 Posts

Posted - 2006-06-22 : 09:02:11
thanks alot for reply.
Go to Top of Page
   

- Advertisement -