Re: help with vb sql program
Try instanciating your connection object. Also, what errors are you getting?
VB Code:
Dim cl As ADODB.Connection
Set cl As New ADODB.Connection
cst = "Provider=SQLOLEDB;" & _
"Data Source=<ARCH-DATA>;" & _
"Initial Catalog=<prototypecopier>;" & _
"Integrated Security=SSPI"
cl.Open cst
cl.CursorLocation = adUseClient
Set rslocation = New ADODB.Recordset
rslocation.Open "select srcdir from tblsrc where app_id=3 and src_location_index=0", cl
sSource = rslocation!srcdir
txtFrom.Text = sSource