How to Use Win32::ODBC

The Win32::ODBC extension attempts to make connecting to an ODBC data source as easy as possible. In doing this, it hides many details from the user. This is either a good or bad thing, depending on your point of view. Nonetheless, the extension is designed to be as flexible as the ODBC API is, without requiring the user to learn the API itself. Of course, to utilize the more exotic ODBC features, a good book on ODBC is recommended; otherwise, you will drive yourself insane with all the constants, functions, and terminology!

When an application wants to connect to an ODBC data source, it must create the following items in order:

  1. An ODBC environment

  2. An ODBC connection to the data source

  3. A statement handle

Because all database ...

Get Win32 Perl Programming: The Standard Extensions, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.