
14/11/2005, 11:41
|
 | | | Fecha de Ingreso: enero-2002
Mensajes: 701
Antigüedad: 23 años, 4 meses Puntos: 8 | |
Error con SELECT en campo tipo fecha Estoy tratando de comparar un campo tipo fecha de una tabla de extension .DBF con una variable llamada fecha_aux
He intentado con # y sin #, pero me arroja un error (Incompatibilidad en el tipo de operador u operando.)
Alguien podria hecharme una manito???
<%
ruta="D:\websites\"
base="boletas.dbf"
fecha_aux="05/11/2005"
fecha_aux=FormatDateTime(fecha_aux,2)
Set conexion=Server.CreateObject("ADODB.Connection")
conexion.Open "Driver={Microsoft Visual Foxpro Driver};SourceType=DBF;SourceDb=" & ruta & base
Xql="SELECT fecha FROM " & ruta & base & " WHERE fecha= ' " & fecha_aux & "' "
Set Xs = conexion.Execute(Xql)
if not Xs.EOF then
while not Xs.EOF
response.write "ok!"
Xs.movenext
wend
end if
Set Xs = nothing
Set conexion = nothing
%> |