Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: (Microsoft OLE DB Provider for ODBC Drivers) error '80040e14'


Message #1 by "michell varela fuentes" <miguecorr@h...> on Wed, 25 Sep 2002 17:05:07
Could anyone help me with a fox pro database conexion in an asp code; my 
code is next:

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 & "'#")

It send me a sintax error, fecha1 and fecha2 are data from a form
and it benn like this: "05/14/2002" , so i think that the format is the 
correct and the problem is with my sintax, so i want to ask u for see my 
code and tell me what is wrong with the date interval.

Message #2 by Greg Griffiths <greg2@s...> on Wed, 25 Sep 2002 21:48:57 +0100
you may need to do a type conversion on the dates so that the DB knows 
which format you are using - Oracle uses to_date and to_char

At 17:05 25/09/02 +0000, you wrote:

>miconn.Open("DRIVER={Microsoft Visual FoxPro Driver}; SourceType=DBF;
>DSN=mp1; Exclusive=no; Backgroundfetch=no")



  Return to Index