Results 1 to 2 of 2

Thread: [resolved]DataType Mismatch

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2006
    Location
    Chennai, India
    Posts
    4

    [resolved]DataType Mismatch

    hi i m doing a project in which i connect a MS Access DataBase...

    i have a field Q_id which is number. but when i open the table using

    VB Code:
    1. rs.Open "select * from questions where q_id='" & CInt(LQNumber(Q - 1)) & "'", db, adOpenDynamic, adLockOptimistic, adCmdText"

    but it says "datatype mismatch in criteria expression"

    pls help me

    thanks
    Last edited by aravindcm; Feb 17th, 2006 at 07:00 AM.

  2. #2
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: DataType Mismatch

    Remove the surrounding single quotes....

    VB Code:
    1. rs.Open "select * from questions where q_id=" & CInt(LQNumber(Q - 1)) & "", db, adOpenDynamic, adLockOptimistic, adCmdText
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

Posting Permissions

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



Click Here to Expand Forum to Full Width