Re: Matt's ODBC wrapper and Mysql
- Posted by Matt Lewis <matthewwalkerlewis at yahoo.com> Nov 01, 2004
- 648 views
George Walters wrote: > > > Matt, I think there is a problem with error handeling in execDirect. Or > I'm handeling it wrong (most likely). I had a syntax error in the SQL > statement and odbcError reported an "invalid handle". Here's how I'm using > it. The value returned for "a" was -29. On one of the SQL fields I had {48} > instead of "0" which caused this error. > > }}} <eucode> > a = execDirectODBC(dbId, "replace " & openTbNames[t] & > " values (" & packRecord( t, recordKey, recordDb) & ")") > if atom(a) then > odbcError(-a) > a = message_box("Can't find record "&recordKey&" to update.","",0) > abort(1) > else > > </eucode> {{{ I'm not sure what the problem might be here. Are you saying that odbcError gives a message box saying the error is an invalid handle? Because that would mean the error is coming from MySQL. It seems like a strange error to return. I'd expect something about a bad datatype or something. Matt Lewis