<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head>
<title>README for Win32::SqlServer</title>
<style type="text/css">
<!--
.allcaps {font-size: 90%;}
-->
</style>
<meta http-equiv="Content-Language" content="en-gb"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css">
<!--
.allcaps {font-size: 90%;}
-->
</style></head>



<body>
<h1 align="center">Win32::SqlServer 2.005</h1>
<ul>
<p>
     This is Win32::SqlServer, a module for calling Microsoft <small class="allcaps">SQL</small> Server from Perl
     through <small class="allcaps">OLE DB</small>. </p>
<p>
     Copyright © 2004-200<span lang="sv">9</span> Erland Sommarskog.
     All rights reserved.<br></p>
<p>
  This program is free software; you can redistribute it and/or modify it under
  the same terms as Perl itself.
</p>
</ul>
<h3>Brief Overview</h3>
Win32::SqlServer is a module that permits you to access <small class="allcaps">SQL</small> Server from Perl, by
using any of the <small class="allcaps">OLE DB</small> providers <small class="allcaps">SQLOLEDB</small> or <small class="allcaps">SQL</small> 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
<small class="allcaps">MSSQL</small>::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.<p>There is no support for <small class="allcaps">DBI</small>. This module does not
   run on Unix – or any other non-Windows OS for that matter.</p>
<h3>What's in This Kit</h3>
This is the source-only distribution for <small class="allcaps">CPAN</small>,
and do not include any binaries for Win32::SqlServer. If you want a binary distribution
(for x86 or AMD64) please visit <a href="http://www.sommarskog.se/mssqlperl/index.html">
http://www.sommarskog.se/mssqlperl/index.html</a>.
<h3>Prerequisites</h3>
<p>To run Win32::SqlServer you need:</p>
<ul>
<li> Perl 5.8.3 or later. (That is ActivePerl build 809 or later.)</li>
<li> Windows NT4 SP6, Windows 2000, Windows XP, Windows 2003, Windows Vista or
Windows 2008.</li>
<li> <small class="allcaps">SQL</small> Server 6.5 or later.</li>
<li> <small class="allcaps">MDAC</small> 2.6 or <small class="allcaps">SQL</small>
Server Native Client.</li>
</ul>

<p>For details, see the <a href="Win32-SqlServer.html#Prerequisites">Prerequisites</a>
   section in the Win32::SqlServer manual.</p>
<p>Prerequisites for building, see below under <a href="#build_src">Building from
   Sources</a>.</p>

<h3>Manual</h3>
<p>The manual is in <a href="Win32-SqlServer.html">Win32-SqlServer.html</a>.
   There is a <small class="allcaps">POD</small> file as well, but there is no real contents in it, only a
   pointer to the <small class="allcaps">HTML</small> file.</p>
<h3>Reporting Bugs or Problems</h3>
<p>Please mail bug reports and suggestions to <a href="mailto:esquel@sommarskog.se">
esquel@sommarskog.se</a>. Try to make your reports as specific as possible.
Particularly do not forget to include which versions of Perl, Windows, <small class="allcaps">SQL</small> Server
etc you are using.</p>
<p>
I usually try to respond within 24-48 hours, but if I am on holiday I am.</p>
<h2><a name="build_src">Building from Sources</a></h2>
<h3>Prerequisites</h3>
<p>To build Win32::SqlServer you need:</p>
<ul>
<li> The Platform <small class="allcaps">SDK</small> for Windows, more
   precisely, the Core <small class="allcaps">SDK</small> and the <small class="allcaps">MDAC SDK</small>.
   The Platform <small class="allcaps">SDK</small> comes with Visual Studio. You can
   also download the
<a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=F26B1AA4-741A-433A-9BE5-FA919850BDBF&amp;displaylang=en">Windows SDK for Windows Server 2008 and .NET Framework 3.5</a>.
(The link is the current as of this writing. Microsoft often twitches things
around, so you have to search for it.)</li>
<li> The SDK (header files and link libraries) for SQL Server Native client that
comes with SQL 2008. (The SDK for SQL 2005 won't do.) </li>
   <li> Perl 5.8.3 or later.</li>
<li>
    <small class="allcaps">A C</small>++ compiler, preferably Visual C++ 8.0 or later. (The C++ compiler that
   comes with Visual Studio&nbsp;6 will <b>not</b> work.) If you don't have
   Visual Studio, the Windows SDK (see above), comes with one.</li>
<li> A make facility. Microsoft's <small class="allcaps">NMAKE</small> also
comes with the Windows SDK.</li>
</ul>

<h3>How to Build and Install</h3>
<p>Text in <kbd>this type face</kbd> indicates command you run from the command
prompt.</p>
<ol type="1">
<li>Extract the zip file anywhere you like.</li>
<li>Edit <b>makefile.pl</b> so that <code>$SQLDIR</code> points to where <b>sqlncli.h</b> is
   located.</li>
<li>If you use a different compiler from Visual C++, you need to review
makefile.pl more closely. <b>makefile.pl</b> includes two linker options
specifed with <i>dynamic_lib</i> option that are likely to work only with Visual C++.
<b>/base</b> is only there to set a difference base address for better startup
performance. <b>/delayload</b> is more important: it defers the loading of
sqlncli10.dll until it's actually needed, or more precisely until you call
OpenSqlFilestream. Without /delayload, Win32::SqlServer would not run on systems
without SQL Server Native Client 10. If you use a different compiler than VC++,
this is something you need to address.</li>
<li>Note that <b>makefile.pl</b> explicitly lists which libraries to link with,
   and specifies the MT flag for the C compiler. This is to force use of the
   static C run-time library for Visual C++, which is what I want for the binary
   distribution. Change this if you like.</li>
<li>Open a Command Prompt, and change directory to where you extracted the
   files.</li>
<li><kbd>Perl makefile.pl</kbd>. </li>
<li><kbd>MAKE</kbd><br>Or <kbd>NMAKE</kbd>, <kbd>DMAKE</kbd> or whatever your
   <small class="allcaps">MAKE</small> utility you use.</li>
<li><kbd>MAKE test</kbd><br>Before you run the tests, please read <b>
   <a href="Tests.html">tests.html</a></b>
   so that you understand what impact the test scripts have on your server. This
   document also describes how to set the environment variable
   <small class="allcaps">OLLEDBTEST</small>, from
   which the test scripts get information how to log into <small class="allcaps">SQL</small> Server.</li>
<li><kbd>MAKE install</kbd></li>
</ol>
<h3><span lang="sv">Known Issues</span></h3>
<h4><span lang="sv">ActivePerl</span></h4>
<p><span lang="sv">Win32::SqlServer does not build for x86 with ActivePerl builds 1004 and 1005, because of a bug in
ExtUtils::MM_Win32. I've <a href="http://rt.perl.org/rt3//Public/Bug/Display.html?id=61492">reported the bug</a>, and it
was closed as fixed well before build 1005 came out, but 1005 does not include the fix. To build Win32::SqlServer for
x86 with ActivePerl, you need build 1002. (Maybe build 1003, I have not tested that build.)</span></p>
<p><span lang="sv">The bug does not affect building Win32::SqlServer for the x64 architecture.</span></p>
<h4><span lang="sv">Other Compilers than Visual C++</span></h4>
<p><span lang="sv">To be honest, I have no idea if that will work. I have certainly not tested, and nor do I plan to.</span></p>
<hr>
<i>
Last updated <!--$$Modtime:--> 09-06-21 19:46 <!-- $-->
</i>


</body></html>