To create an ODBC object in Perl, include the Win32::ODBC module, create a new Win32::ODBC object using the DSN name, check that the object is defined, run SQL queries and retrieve data, and close the connection when finished.
To create an ODBC object in Perl, include the Win32::ODBC module, create a new Win32::ODBC object using the DSN name, check that the object is defined, run SQL queries and retrieve data, and close the connection when finished.
To create an ODBC object in Perl, include the Win32::ODBC module, create a new Win32::ODBC object using the DSN name, check that the object is defined, run SQL queries and retrieve data, and close the connection when finished.
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();