|
-
Aug 2nd, 2000, 07:56 AM
#1
Thread Starter
Junior Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|