Tengo un error trabajando con Visual Basic 6, Microsoft Access 2003 y SQL
Te hago una consulta estoy en VB6, access 2003 y SQL.. Te paso el modulo a ver si ves el error que dice "no coinciden los tipos"
Public rs As New ADODB.Recordset
Public cn As ADODB.Connection
------------------------------------------------------------------------------------
Public Sub Conectar()
Set cn = New ADODB.Connection
cn.CursorLocation = adUseClient
cn.Open "provider= microsoft.jet.oledb.4.0;data source=C:\.......BD.mdb;persist security info=false"
Exit Sub
End Sub
-------------------------------------------------------------------------------
Public Function ConsultaSQL(sql As String) As Recordset
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open sql, cn, adOpenStatic, adLockOptimistic
Set ConsultaSQL = rs ----->ACA ME DA EL ERROR: consultaSQL=Nothing me dice
End Function
Librerias: Microsoft ADO extens 2.5, M.office 11.0, M.Jet, M.DAO 3.6, M.access 11.0 y las q siempre salen x defecto.
Public rs As New ADODB.Recordset
Public cn As ADODB.Connection
------------------------------------------------------------------------------------
Public Sub Conectar()
Set cn = New ADODB.Connection
cn.CursorLocation = adUseClient
cn.Open "provider= microsoft.jet.oledb.4.0;data source=C:\.......BD.mdb;persist security info=false"
Exit Sub
End Sub
-------------------------------------------------------------------------------
Public Function ConsultaSQL(sql As String) As Recordset
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open sql, cn, adOpenStatic, adLockOptimistic
Set ConsultaSQL = rs ----->ACA ME DA EL ERROR: consultaSQL=Nothing me dice
End Function
Librerias: Microsoft ADO extens 2.5, M.office 11.0, M.Jet, M.DAO 3.6, M.access 11.0 y las q siempre salen x defecto.
1 Respuesta
Respuesta
1