Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Posts
    1

    Red face Unanswered: Data type mismatch blues.

    We have an old DOS program that is still in use daily. I am trying to use the existing dBase database (not sure what version) and write a more user friendly interface in vb6. I have used and ADO control and am connecting through ODBC. I can populate the datagrid control without a problem, but when I try try:

    Adodc2.RecordSource = "SELECT * FROM Supplier WHERE JOB_NO = '" & JobNumber & " '"

    I get a data type mismatch for the JobNumber. The job number would typically be 1394.02 for example. I have tried declaring it as an Integer, String, long, short and double. I keep getting the same error:
    [Microsoft][ODBC dBase driver] data type mismatch in criteria expression.

    I have been trying to sort this out for the last six hours. Can anyone help?

  2. #2
    Join Date
    Jan 2004
    Posts
    184

    Re: Data type mismatch blues.

    I am not familiar with dBase but is the syntax the same as SQL? (i.e. does it use single quotations around the value as you are using?

    Instead of ADODC try this control instead
    In abundance of water only the fool is thirsty. Bob Marley.

Posting Permissions

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