Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: EZDBI is an easier interface to SQL databases

by mikeB (Friar)
on Oct 10, 2001 at 20:33 UTC ( [id://118039]=note: print w/replies, xml ) Need Help??


in reply to EZDBI is an easier interface to SQL databases

I went this route once, and while it worked nicely for Select, Update didn't seem to fit too well. After various attempts, I went back to using DBI for anything more than a quick query.

I'll be curious to see what you come up with. I'm sure you're much better at this than I :)

  • Comment on Re: EZDBI is an easier interface to SQL databases

Replies are listed 'Best First'.
Re: EZDBI is an easier interface to SQL databases
by Dominus (Parson) on Oct 10, 2001 at 21:29 UTC
    Says MikeB:
    I went this route once, and while it worked nicely for Select, Update didn't seem to fit too well.
    Hmm. It seems to me that it works better for update than for select, because with select there are a lot of different ways you might want to get the result back, but with update that is not an issue.

    You probably know something that I need to know. Do you remember what the problem with update was?

    --
    Mark Dominus
    Perl Paraphernalia

      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 :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://118039]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (9)
As of 2024-04-23 12:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found