can anyone help me to see what's wrong with the following code?
I got errors at c1.open cst and else.

it's as simple as reading data from sql table and retrieve a field to display

thanks

VB Code:
  1. Dim cl As ADODB.Connection
  2. cst = "Provider=SQLOLEDB;" & _
  3.         "Data Source=<ARCH-DATA>;" & _
  4.         "Initial Catalog=<prototypecopier>;" & _
  5.         "Integrated Security=SSPI"
  6. cl.Open cst
  7. cl.CursorLocation = adUseClient
  8. Set rslocation = New ADODB.Recordset
  9.  rslocation.Open "select srcdir from tblsrc where app_id=3 and src_location_index=0", cl
  10.        
  11. sSource = rslocation!srcdir
  12. txtFrom.Text = sSource