
Worked fine yesterday, today I get Error 13 Type Mismatch errors
Hi all,
I have some very simple DAO code that creates a temporary
querydef, executes it into a recordset, and then does
stuff with the results. (snippet here...)
Dim myDB As Database
Dim myQD As QueryDef
Dim myRS As Recordset
Set myDB = CurrentDb
With myDB
' Create temporary QueryDef.
Set myQD = .CreateQueryDef("", _
"SELECT desc FROM valveloc where id = " & _
loc_id)
--> Set myRS = myQD.OpenRecordset(dbOpenSnapshot)
myRS.MoveFirst
GetValveDesc = myRS!desc
myRS.Close
It ran fine a few days ago, now it consistantly dies at
the line with the error with a Error 13 - Type Mistmatch.
The SQL it's trying to exe is "SELECT desc FROM valveloc
where id = 1". This is under Office XP, all in Access,
Oracle backend via ODBC. DAO 3.6 selected (although) 3.51
did the same.
Any advice on what's causing this and how to get rid of it?
Any and all help appreciated.
-Bill