more useful options | |
PerlMonks |
Re: Re: EZDBI is an easier interface to SQL databasesby mikeB (Friar) |
on Oct 10, 2001 at 22:30 UTC ( [id://118080]=note: print w/replies, xml ) | Need Help?? |
I always returned an array of hashrefs, figuring if that wasn't enough I'd be using the standard interface :)
It's been a while but I think the problem was that I was using Win32:ODBC, before I discovered DBI, so was trying to put the values directly in the SQL string rather than using placeholders. To get the data correctly escaped required finding the type of each field. IIRC, my approach was a little different in that I passed the hashref from the select back to the update. Of course, there's also the issue of how to handle updates to complex queries. When it got to the point where it seemed I was essentially recreating M$ ADO, with all it's problems, I decided it wasn't worth it to me. With DBI's RaiseError and fetchall_arrayref now available, I don't bother to use my old query module anymore even for simple selects. With DBI and placeholders, you can probably handle simple updates without much problem. I don't mean to sound discouraging. I'm rather hoping you find a way :)
In Section
Meditations
|
|