Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
This definitely applies to DBI, but looking over the win32:ODBC docs it seems applicable here too. Generally speaking, you need to execute any sql statement (and most statements can be prepared before they are executed) in order to use it. in terms of select statements, once executed you can perform a fetch to get at the data.

I guess my real question (not just for you, but for any monk with an opinion) is why to use win32::ODBC in the first place? This admittedly biased presentation makes it seem like a bad idea.

I also am quite new to perl, having started just two months ago, and the only reason I even started with perl was because I had been hired to do a bunch of database management type stuff and I saw that as an excuse to learn something new and make the process fun. and so far it has been.

I did not use the win32 module even though I also am dealing with access (and coding on an NT box). Frankly, I didn't find out about win32::ODBC until after I had already started writing using DBI and the ODBC DBD. At that point I was too lazy to go after another module when the one I had seemed to be working just fine. I must say I've been mighty pleased with my (blindly made) choice.

The best part of working with DBI, you see, has been the documentation-- it could not have been more helpful or easy to use. I mention it specifically because of its explanation of the general prepare, execute, fetch process for sql queries which might help you figure out what your win32::ODBC calls should look like.

Another option is apparently DBIx, though I know very little about it. Check out this article if you are interested, though.

If you do decide to pursue DBI at all, this article (written by chromatic) was a huge help to me and clued me in on some techniques that turned out to be really important (especially using transactions and trapping the execution of certain types of sql statements (like updates and inserts) inside eval blocks to make sure that no incorrect changes get made). Actually, all of the database Tutorials here at Perlmonks were really helpful, and that's actually how I came here in the first place.

hope this helps at all,
--au


In reply to Why not DBI and ODBC DBD? by aufrank
in thread MS Access entry index key values by blackadder

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2022-08-16 10:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?