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?
 

mzim

Well-known member
Joined
Jun 3, 2004
Messages
187
Location
Other side of the rock
Programming Experience
1-3
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..
 

mzim

Well-known member
Joined
Jun 3, 2004
Messages
187
Location
Other side of the rock
Programming Experience
1-3
Last edited:
Top Bottom