Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Date query


Message #1 by "michell varela fuentes" <miguecorr@h...> on Wed, 9 Oct 2002 22:56:13
I make a date search in a vfox database with the next code and it made an 
error that says: "lack any operator" 

CODE:
<%
     d1=cstr(request.form("dia1"))
     m1=cstr(request.form("mes1"))
     a1=cstr(request.form("anio1"))
 
     fecha1=(m1 & "/" & d1 & "/" & a1) 
     fecha= month(fecha1) & "/" & day(fecha1) & "/" & year(fecha1)    

     Set miconn=Server.CreateObject("ADODB.Connection") 
     miconn.Open("DRIVER={Microsoft Visual FoxPro Driver};SourceType=DBF;  
DSN=mp1; Exclusive=no; Backgroundfetch=no") 

set informe = miconn.Execute("select fecdocto,numdocto,seriedocto from 
mgp10008 where numtipodoc='" & valor & "' and fecdocto >= #" & fecha & "#")
%>

i test the code and the error was on the date format, the format of the 
date fiel in the vfox database is:(mm,dd,yyyy)
Please help me !!!!!!!!!!


  Return to Index