i have a vfox database where thereīs a field call fecdocto of date type
(03/13/2001), iīm trying to make a sql sentence that show me the documents
between 05/04/2001 and 05/04/2002, i get this dates from a form, when i
made the connection it gave as result:
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC Visual FoxPro Driver] type mistmatch
the asp code is next:
<% Dim valor,d1,m1,a1,d2,m2,a2,fecha1,fecha2
valor=cstr(request.form("example"))
d1=cstr(request.form("day1"))
m1=cstr(request.form("month1"))
a1=cstr(request.form("anio1"))
d2=cstr(request.form("day2"))
m2=cstr(request.form("month2"))
a2=cstr(request.form("anio2"))
fecha1=cdate(m1 & "/" & d1 & "/" & a1)
fecha2=cdate(m2 & "/" & d2 & "/" & a2)
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,unidadestl,impnetodoc,impivadoct,imptotaldo,or
igendoct,cancela from mgp10008 where numtipodoc='" & valor & "' and
fecdocto between '" & fecha1 & "' and '" & fecha2 & "'")
I donīt know where the error is, please help me !!!!