Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

[Pervasive][ODBC Client Interface][LNA][Pervasive][ODBC Engine Interfa

Status
Not open for further replies.

supersal666

Programmer
Sep 11, 2007
6
0
0
GB
Hi everyone, have a problem where this error occurs sometimes when trying to view refunds:

Refund Checking fault occurred
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Pervasive][ODBC Client Interface][LNA][Pervasive][ODBC Engine Interface]Invalid date, time or timestamp value.
/refundcheckingsql/reports/CalcRiskInclude.asp, line 109

the line of code is:

thisquery = "select type as tender from dlpaid where stor = '"&istor&"' and tran = '"&itran&"' and till = '"&itill&"' and date1 = '"&right(idate, 4)&"-"&right(left(idate, 5), 2)&"-"&left(idate, 2)&"' "

set ConnRsOrig =oconnPV.execute(thisquery)

The date is stored in a my sql database as type smalldatetime.

Has anybody any idea why this error is occuring. It is strange because the query runs successfully sometimes but not all the time.

Thanks

Sally
 
Thanks mark, I did not write this code I am just trying to fix the error, hence why I'm not sure what the problem is.

Thanks anyway

Sally
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top