Problemas con el recordset!!
Publicado por Vane (13 intervenciones) el 23/05/2003 10:37:32
A ver si alguien me puede ayudar. Estoy intentando hacer un recordset, pasando como parametros un texto y una fecha. A la hora de pasar el texto o un numero no hay problemas pero la fecha no se como hacerlo. A continuacion os adjunto mis diferentes pruebas y cada uno de los errores que he obtenido. Por favor AYUDARME!!
//PRUEBA 1
Set nuevaTabla = nuevaBase.OpenRecordset("select * from horas where horas.nombre ='" & Text7.Text & "' and horas.fecha=" & CDate(Text8.Text))
Text4.Text = nuevaTabla!nombre
Text5.Text = nuevaTabla!fecha
Text6.Text = nuevaTabla!diferencia
//NO HAY NINGUN REGISTRO ACTIVO
//PRUEBA 2
Set nuevaTabla = nuevaBase.OpenRecordset("select * from horas where horas.nombre ='" & Text7.Text & "' and horas.fecha=" & text8.Text)
Text4.Text = nuevaTabla!nombre
Text5.Text = nuevaTabla!fecha
Text6.Text = nuevaTabla!diferencia
//NO HAY NINGUN REGISTRO ACTIVO
//PRUEBA 3
Set nuevaTabla = nuevaBase.OpenRecordset("select * from horas where horas.nombre ='" & Text7.Text & "' and horas.fecha='" & Text8.Text & "'")
Text4.Text = nuevaTabla!nombre
Text5.Text = nuevaTabla!fecha
Text6.Text = nuevaTabla!diferencia
//NO COINCIDEN LOS TIPOS
//PRUEBA 1
Set nuevaTabla = nuevaBase.OpenRecordset("select * from horas where horas.nombre ='" & Text7.Text & "' and horas.fecha=" & CDate(Text8.Text))
Text4.Text = nuevaTabla!nombre
Text5.Text = nuevaTabla!fecha
Text6.Text = nuevaTabla!diferencia
//NO HAY NINGUN REGISTRO ACTIVO
//PRUEBA 2
Set nuevaTabla = nuevaBase.OpenRecordset("select * from horas where horas.nombre ='" & Text7.Text & "' and horas.fecha=" & text8.Text)
Text4.Text = nuevaTabla!nombre
Text5.Text = nuevaTabla!fecha
Text6.Text = nuevaTabla!diferencia
//NO HAY NINGUN REGISTRO ACTIVO
//PRUEBA 3
Set nuevaTabla = nuevaBase.OpenRecordset("select * from horas where horas.nombre ='" & Text7.Text & "' and horas.fecha='" & Text8.Text & "'")
Text4.Text = nuevaTabla!nombre
Text5.Text = nuevaTabla!fecha
Text6.Text = nuevaTabla!diferencia
//NO COINCIDEN LOS TIPOS
Valora esta pregunta


0