Results 1 to 2 of 2

Thread: Error 3464 Data type Mismatch

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 1999
    Location
    Halifax, NS Canada
    Posts
    30
    We are using VB 6.0 and Access 2000

    In an SQL statement in a VB program we are getting Error 3464 - Data Type Mismatch.

    The pertinent code is as follows:

    Dim stDrawNum As String
    Dim iIssueNum As Integer
    Dim RS as dao.Recordset
    Dim DB as Database

    (datDuplicate is a data control on the form)

    stDrawNum = datDuplicate.Recordset("Drawing #")
    iIssueNum = datDuplicate.Recordset("Issue #")

    Set RS = DB.OpenRecordset("Select * from [Lucent]" _
    & " Where [Drawing Number] = '" & stDrawNum & "'" _
    & "and [Issue Number] = '" & iIssueNum & "'")

    It is at this point that we get Error 3464. The Issue # in the database is an integer. If we use only 'stDrawNum' in the SQL statement, no error occurs, so it is the 'iIssueNum' that is giving us the problem. I had this problem before and it had nothing to do with the data types, it was something else that was causing the error, however I forget what it was. Can anyone help me here please.

  2. #2
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105
    try:

    Set RS = DB.OpenRecordset("Select * from [Lucent]" _
    & " Where [Drawing Number] = '" & stDrawNum & "'" _
    & "and [Issue Number] = " & iIssueNum )

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