Win32::ODBC Documentation
Business Stuff
ODBC extension for Win32 PERL
Version 96.05.08
by Dave Roth (rothd@roth.net)
Based on code by Dan DeMaggio (dmag@umich.edu) -- Thanks Dan!
Back to the top
Copyright
Copyright © 1996 Dave Roth. All rights reserved.
This program is free software; you can redistribute it or modify it under
the same terms as PERL itself.
Back to the top
Disclaimer
I do not guarantee ANYTHING with this package. If you use it you
are doing so AT YOUR OWN RISK! I may or may not support this depending
on my time schedule and I am neither an SQL or ODBC guru so do not ask
me questions regarding them!
Back to the top
GNU General Public License
Coming soon....
Back to the top
Larry Wall's "Artistic License"
Artistic License
Back to the top
Version History
ODBC.PM
Date |
Changes |
96.03.27 |
Initial Release (rothd) |
96.04.08 |
Changed Data() to accept an array of
field names, returning an array or scalar (joc) |
Various bug fixes (joc) |
96.04.10 |
Fixed the RowCount() to default
to the current connection (droth) |
96.04.15 |
Changed version numbers to a date format (rothd) |
96.05.07 |
Fixed Data(): If returning an array,
the array consisted of the requested fieldnames + the values. Now only
returns the values. Thanks to Dan Westerlund <westerlund@dkraft.se>!
(rothd) |
96.07.22 |
Added MoreResults(): Checks to
see if there are any more records that have not been retrieved. (dunfordshore) |
96.07.22 |
Changed Error(): Errors are tracked
differently now. Any error will record the error number ($ErrNum) and error
text ($ErrText) in the object's name space and can be retrieved by calling
$Database->Error(). Error() will also return the ODBC connection number
that caused the error. If the context of the call is not an array then
a string with this information will be returned. The Win32::ODBC name space
will always have the last error info made, even if it is an error returned
by the new method. You can call Win32::ODBC::Error() to get that. (rothd) |
ODBC.PLL
Date |
Changes |
96.04.10 |
Fixed a "memory bug": we were using SQL_CLOSE when closing
an ODBC statement. This kept the cursor alive in memory so it can be cached
in the event the same SQL statement is issued. We are now using SQL_DROP.
This may lessen speed if the same SQL statements are issued again and again
per connection. (rothd) |
Cleaned up some code. (rothd) |
96.04.12 |
Added GetStmtCloseType()
and SetStmtCloseType() functions.
(rothd) |
Added some constants. (rothd) |
96.04.13 |
** We now are trying to include a version for builds up to and including
105 and another for builds 106 and greater (for now). |
96.04.15 |
Fix Bug in ODBCFetchRow(): when retrieving a field with a NULL value
the value from the previous field was reported. (jmk) |
Changed version numbers to a date format. |
96.04.22 |
Fix the SDWORD wrap-around bug in ODBCFetchRow(): when a column of
size 2147483647 adding 1 (for a NULL byte in szBuf) yields -2147483648
(not easy to "net UCHAR (-2147483648)"!!) (jmk) |
96.04.22 |
Inspired by Jutta, I have increased the max limit for SetMaxBufSize()
to 2,147,483,647 bytes. (rothd) |
96.05.03 |
Set the lowest allocated char array to be 20 bytes in ODBCFetchRow().
Evidentally sometimes the ODBC manager will report too few chars that are
needed to represent an autonumber field. (rothd) |
96.05.08 |
Convert all results from ODBCTableList() to uppercase since different
ODBC drivers impliment this differently (some uppercase some lower). Thanks
again to Jutta M. Klebe. (rothd)
*** This patch is open for suggestions!!! *** |
96.07.22 |
Added ODBCMoreResults(): Checks to see if there are any more records
that have not been retrieved. (dunfordshore) |
Back to the top
Author List
Abbreviation |
Name |
EMail |
rothd |
Dave Roth |
rothd@roth.net |
joc |
Joe Casadonte |
joc@netaxs.com |
jmk |
Jutta M. Klebe |
jmk@exc.bybyte.de |
dunfordshore |
Brian Dunfordshore |
brian_dunfordshore@bridge.com |
Back to the top
Features/Limits
Features
- The number of ODBC connections is limited only by memory and ODBC itself.
- The working limit to the size of a field is 10240 bytes. This can be
raised (if needed) to a maximum of 2,147,483,647 bytes. This maximum limit
can be raised only by recompiling.
- Connections can be opened using a DSN or connection string.
- Connections can be opened and closed in any order (but they cannot
be closed before they are opened -- maybe next release)
Limits
- If the account that the process runs under does not have write permission
on the default directory (for the process, not the ODBC DSN) you will probably
get a run-time error during an SQLConnection(). I don't think that this
is a problem with the code, more like ODBC. This happens because some ODBC
drivers need to write a temporary file. I noticed this using the MS Jet
Engine (Access Driver).
- This has not been optimized for speed nor optimized for memory consumption.
This may run into memory bloat.
Back to the top
Installation Instructions
- Copy the ODBC.PM file into the \PERL\LIB\WIN32 directory.
- Copy the ODBC10x.PLL file into the \PERL\LIB\AUTO\WIN32\ODBC directory.
This is either ODBC105.PLL (for versions of Perl 105 or before) or ODBC106.PLL
(for versions of Perl 106 or later), renaming the correct file to ODBC.PLL
(run "perl -v" to check which version of perl you have).
- Define a DSN (Data Source Name) and ensure that you have everything
you need to use it normally (ODBC drivers, database files, etc.)
- You are now ready to ODBC all over town!
Back to the top
Bug Reports
Please send bug reports to Dave Roth.
Include the following (if appropriate):
- Versions of both Perl (perl -v) and ODBC
- ODBC data source type (Oracle, Access, etc)
- Short description of the problem
- Small code example which you have tested to ensure that it reproduces
the problem as described
- Output of the code exmaple
Back to the top
Obtaining the Latest Versions
Back to the top
For More Information on Perl
CPAN - Comprehensive Perl Archive Network - Selected Sites
This page maintined by Joe Casadonte. Please let
me if something is wrong or does not make sense. Send these or other comments
to:
joc@netaxs.com.
Copyright © Dave Roth and Joseph L. Casadonte Jr. 1996. All
rights reserved.
Win32::ODBC / 07 May 1996 / joc@netaxs.com