Win32::SqlServer 2.001
This is Win32::SqlServer, a module for calling Microsoft SQL Server from Perl
through OLE DB.
Copyright © 2004-2005 Erland Sommarskog.
All rights reserved.
This program is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.
Brief Overview
Win32::SqlServer is a module that permits you to access SQL Server from Perl, by
using any of the OLE DB providers SQLOLEDB or SQL Native Client.
Win32::SqlServer exposes
two levels of interface, a high-level interface and a mid-level interface. The
high-level interface is a developed version of the interface of my older module
MSSQL::Sqllib, and largely backwards compatible with this interface. The
mid-level interface exposes a few more knobs at the price of somewhat more
verbose code. A special feature of Win32::SqlServer is the fine-grained control
of error handling.There is no support for DBI. This module does not
run on Unix – or any other non-Windows OS for that matter.
What's in This Kit
This is the source-only distribution for CPAN,
and do not include any binaries for Win32::SqlServer. If you want a binary distribution
(for x86) please visit
http://www.sommarskog.se/mssqlperl/index.html.
Prerequisites
To run Win32::SqlServer you need:
- Perl 5.8.3 or later. (That is ActivePerl build 809 or later.)
- Windows NT4 SP6, Windows 2000, Windows XP or Windows 2003.
- SQL Server 6.5 or later.
- MDAC 2.6 or SQL Native Client.
For details, see the Prerequisites
section in the Win32::SqlServer manual.
Prequisits for building, see below under Building from
Sources.
Manual
The manual is in Win32-SqlServer.html.
activeperl-copy.pl also installs it as html/site/lib/Win32/SqlServer.html
There is a POD file as well, but there is no real contents in it, only a
pointer to the HTML file.
Reporting Bugs or Problems
Please mail bug reports and suggestions to
esquel@sommarskog.se. Try to make your reports as specific as possible.
Particularly do not forget to include which versions of Perl, Windows, SQL Server
etc you are using.
I usually try to respond within 24-48 hours, but if I am on holiday I am.
Prerequisites
To build Win32::SqlServer you need:
- The Platform SDK for Windows, more
precisely, the Core SDK and the MDAC SDK.
The Platform SDK comes with Visual Studio. You can
also download it from
http://www.microsoft.com/downloads/search.aspx. (Specify Platform SDK
as Product/Technology.)
- The header file for SQL Native Client sqlncli.h. This file comes
with the SDK for SQL Server 2005. I don't
think it is available as a
separate download, but you can always download the free SQL Express edition. When you install SQL Express, you must uncheck
Hide advanced configuration options, as the SDK is not installed by
default.
- Perl 5.8.3 or later.
-
A C++ compiler, preferrably Visual C++ 7.0 or later. (The C++ compiler that
comes with Visual Studio 6 will not work.) If you don't have
Visual Studio, you can download the .Net Framework SDK (link as above),
there is a C++ compiler included. I have no idea whether Win32::SqlServer compiles
with other C++ compilers than Microsoft's.
- A make facility. You can get Microsofts NMAKE (for x86) on:
ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe
How to Build and Install
Text in this type face indicates command you run from the command
prompt.
- Extract the zip file anywhere you like.
- Edit makefile.pl so that
$SQLDIR
points to where sqlncli.h is
located.
- makefile.pl also includes a dynamic_lib option, which I don't
know whether it will work with other compilers than Visual C++. For better
startup performance, you are encouraged to find the corresponding
command-line option for your compiler. However, you can remove it if you
don't care.
- Open a Command Prompt, and change directory to where you extracted the
files.
- Perl makefile.pl.
- MAKE
Or NMAKE, DMAKE or whatever your
MAKE utility you use.
- MAKE test
Before you run the tests, please read tests.html
so that you understand what impact the test scripts have on your server. This
document also describes how to set the environment variable OLLEDBTEST, from
which the test scripts get information how to log into SQL Server.
- MAKE install
Last updated 05-11-26 23:42