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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB6 Businessworks/Pervasive odbc query

Status
Not open for further replies.

TooMuchFun

Programmer
Oct 10, 2006
7
US
In VB6, when performing this query

"Select Count(timelogged) as LastModified from COAuditLog WHERE timelogged>10/2/2008 AND tablename='customer'"

The above statement produces this error.
"[Pervasive][ODBC Client Interface][LNA][Pervasive][ODBC Engine Interface]Incompatible types in predicate."

By removing the date component of the query, no error
is produced. Any help with forming a correct date
query would be appreciated.

this works
"Select Count(timelogged) as LastModified from COAuditLog WHERE tablename='customer'"


Regards,




 
The date format needs to be: 'yyyy-mm-dd'. For example, your query should be:
"Select Count(timelogged) as LastModified from COAuditLog WHERE timelogged>'2008-10-2' AND tablename='customer'"

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
 
Problem solved.

I've been programming for 25 years. it's nice to
get irritated (pissed off) once in awhile when
things don't work. Live and learn.

You can't go wrong when take the time and
provide this kind of help to others.

Good luck to you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top