[CDBI] Re: mysql execute failed

Michael Reece mreece at vinq.com
Thu Mar 15 01:18:24 GMT 2007


i don't believe that is the case.  examine the error more closely,  
notice the double-quotes around "INSERT...(?, ?, ?)"

the 'with ParamValues' is part of the error statement, not the SQL.

have you tried the obvious thing of executing the query in the mysql  
shell to make sure something isn't weird with your install?

INSERT INTO table1 (testCol1, testCol3, testCol2) VALUES ('testVal1',  
'testVal3', 'testVal2')

have you tried 'setenv DBI_TRACE 2' (or 'export DBI_TRACE=2' for  
bash?) and seeing the exact SQL that is being sent to DBI?

the SQL statement looks ok, but i have seen mysql complain about  
syntax when the query contains tabs instead of spaces, so check your  
files and make sure you haven't put tabs somewhere you shouldn't ..



On Mar 14, 2007, at 3:55 PM, k meehl wrote:

> Hi Ed, thanks for the quick reply.
>
> I've double checked my definitions and everything is
> good. It looks from the error like an invalid query is
> being sent to mysql. From the error message, the SQL
> statemnt is
>
> INSERT INTO table1 (testCol1, testCol3, testCol2)
> VALUES (?, ?, ?)" with ParamValues: 1='testVal3',
> 0='testVal1', 2='testVal2'
>
> I've never seen this ParamValues syntax before and
> AFAICT it's not valid SQL. My guess is that this
> intermediate syntax isn't being translated to SQL
> properly, but why?
>
>
>
> --- "Edward J. Sabol" <sabol at alderaan.gsfc.nasa.gov>
> wrote:
>
>>> I am at a complete loss as to where to look to
>> resolve this error. If
>>> anybody can help, or at least point me in a
>> general direction, it would be
>>> greatly appreciated.
>>
>> The most likely place is in your testdb::table1
>> module. My guess is that you
>> have a syntax error your columns() definitions.
>>
>> Hope this helps,
>> Ed
>>
>
>
>
>
> ______________________________________________________________________ 
> ______________
> No need to miss a message. Get email on-the-go
> with Yahoo! Mail for Mobile. Get started.
> http://mobile.yahoo.com/mail
>
> _______________________________________________
> ClassDBI mailing list
> ClassDBI at lists.digitalcraftsmen.net
> http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

---
michael reece :: software engineer :: mreece at vinq.com





More information about the ClassDBI mailing list