You are on page 1of 1

Creating an ODBC Object

Your script will need to have the following line:


use Win32::ODBC;
Then you will need to create a data connection to your DSN:
$Data = new Win32::ODBC("MyDSN");
You shoud check to see if $Data is indeed defined otherwise there has been an error. You can now send SQL queries
and retrieve info to your heart's content! See the description of functions below and also test.pl to see how it all
works.

Make sure that you close your connection when you are finished:
$Data->Close();

You might also like