Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/02/2005, 07:10
rodrigobarrere
 
Fecha de Ingreso: febrero-2005
Mensajes: 3
Antigüedad: 20 años, 2 meses
Puntos: 0
Exclamación consulta sql en adodc

hola tengo el siguiente codigo y no me funciona podrian corregirlo por favor????
Private Sub cmd_buscar_Click()
Dim cnn As New ADODB.Connection

Dim rst As New ADODB.Recordset

Dim strProveedor As String

Dim strOrigenDatos As String

Dim strSQL As String

strProveedor = "Microsoft.Jet.OLEDB.4.0"

strOrigenDatos = "c:\agenda\contactos.mdb"

strSQL = "SELECT * FROM contactos where Nombre =" & TXT_BUSCAR.Text

cnn.Open "provider=" & strProveedor & "; Data Source=" & strOrigenDatos

rst.Open strSQL, cnn, Adodc1

'Set Adodc1.DataSource = rst

End Sub