Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Perl and MS Access

by mr_dont (Beadle)
on Oct 08, 2001 at 21:17 UTC ( #117514=note: print w/ replies, xml ) Need Help??


in reply to Perl and MS Access

I once wrote a perl script that connected to an Access Database using the Win32::ODBC module...

Here is a bit of code to get you started:

# Load the module use Win32::ODBC; # Make a new database object, the dsn, # userid, and password are things you need # to fill in my($db) = new Win32::ODBC("dsn=yourdsn; uid=foo; pwd=bar"); # Send the database some SQL $db->Sql("SELECT * FROM your_table"); #print out some stuff while ($db->FetchRow()) { my(%data) = $db->DataHash(); print "Your data is: $data{'some_value'}"; } # Close the database $db->Close();

It is a good idea to include statements that check for errors... maybe you should read this tutorial.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (11)
As of 2016-07-01 16:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (9 votes). Check out past polls.