Im a newbie...

HyperThread

New member
Joined
Jun 7, 2004
Messages
2
Programming Experience
1-3
Hi i am a newbie at .NET but currently I am a Visual Basic 6 Programmer...
can you please teach how to establish a connection to a SQL server 2000?
 
HyperThread said:
Hi i am a newbie at .NET but currently I am a Visual Basic 6 Programmer...
can you please teach how to establish a connection to a SQL server 2000?
imports System.Data.Sqlclient
'declare connection

Dim cn As New SqlConnection("integrated security=true;initial catalog=northwind;data source=...")
Dim cm As New SqlCommand()

'in the formload

cn.open
cm.Connection = cn
cm.CommandType = CommandType.StoredProcedure

hope it helps..
 
Last edited:

Latest posts

Back
Top