On 18/10/10 14:02, Roode, Eric wrote: > On Saturday, October 16, 2010 6:18 AM, Martin J. Evans wrote: > >> On 15/10/2010 22:20, Roode, Eric wrote: >>> Hello all, >>> >>> DBI docs says that statement handle method execute() returns undef on >>> error. I have found a situation where that does not hold. Was > hoping >>> someone could help me out, maybe there's a workaround. >> >> You need to read further down that entry where it says: >> >> "If the number of rows affected is not known, then execute returns > -1." >> >> Admittedly, in your case it looks like an error from the driver >> error message but it did not return an error so perhaps you stopped >> when you saw undef for error. > > I knew perfectly well that -1 means "number of rows unknown". I didn't > see how that could apply to "[Microsoft][ODBC SQL Server Driver][SQL > Server]Cannot insert the value NULL into column 'enabled', table > 'feeds'; column does not allow nulls. INSERT fails. (SQL-23000) > [state was 23000 now 01000] [Microsoft][ODBC SQL Server Driver] > [SQL Server]The statement has been terminated. (SQL-01000)" > > That's just an error, plain and simple. I'm perfectly willing to > accept that it may not have been reported as an error, due to a bug in > Microsoft's driver or whatever, but to suggest that I didn't read the > docs and therefore didn't interpret -1 correctly is ridiculous. > > -- Eric >
I never meant to offend you with that statement and I agreed it was an error. You are posting on a public list and presumably wanting feedback/help. I only know what you've told me, nothing else. Perhaps you might think about that before leaping to the conclusion you seem to have. I spent nearly one hour of my Saturday looking into the problem you reported so obviously I took your report seriously. Perhaps some calm is required. Martin