Results 1 to 2 of 2

Thread: error

  1. #1
    Join Date
    Dec 1969

    Default error

    I&#039;m trying to get a value from a access db, but gets this error<BR><BR>Microsoft OLE DB Provider for ODBC Drivers (0x80040E07)<BR>[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.<BR><BR>The table name in the db in Ordre, and the field is named OKID. And is a number.<BR><BR>The query getting the value is:<BR>sqlOID= " select OID from Ordre where OKID=&#039;" & KID & "&#039; order by OID desc"<BR><BR>What is the problem?<BR><BR>If i change OKID into text it workes fine, but then I get the same error when inputting a number to the field. I&#039;ve tried having OKID as number and do a cint, but still it doesnt work.<BR><BR>Help plz<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: error

    Hi,<BR> I feel that the culprit is the single quote in the query. Removing it might solve the problem.<BR><BR>Hope this answers your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts