Visual Basic - QueryDefs en ADO

Life is soft - evento anual de software empresarial
 
Vista:

QueryDefs en ADO

Publicado por Miguel Arce (5 intervenciones) el 25/06/2002 08:11:28
La pregunta es como hacer las QueryDefs que se hacian en DAO ahora con ADO. El resto de la aplicación la tengo ya en ADO y me funciona correctamente.

Adjunto un evento de una consulta hecho en DAO.

Private Sub Command1_Click()
Set consulta = cn.QueryDefs("entradas")
consulta.SQL = "SELECT * FROM Facturas INNER JOIN (Articulos INNER JOIN DetallesFacturas ON Articulos.referencia_art = DetallesFacturas.ref_artic_factu) ON Facturas.idfactura = DetallesFacturas.idfactura where month(facturas.fecha_factu)=" & a & " and year(facturas.fecha_factu)=" & b
CrystalReport1.ReportFileName= App.Path & "\Infor.rpt"
CrystalReport1.WindowState = crptMaximized
CrystalReport1.Action = 1
End Sub

Un saludo y gracias.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:QueryDefs en ADO

Publicado por antonio (34 intervenciones) el 03/07/2002 17:46:49
con ado no hay querydef sino command me explico
Dim Cmd As ADODB.Command
Set Cmd = New ADODB.Command
Cmd.CommandType = adCmdText
Cmd.ActiveConnection = tuconexion
Cmd.CommandText = tuconsulta
y por ultimo para ejecutarlo
Cmd.Execute
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar