<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://panoptic.com/mediawiki/aolserver/index.php?action=history&amp;feed=atom&amp;title=Nsfreetds_FAQ</id>
	<title>Nsfreetds FAQ - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://panoptic.com/mediawiki/aolserver/index.php?action=history&amp;feed=atom&amp;title=Nsfreetds_FAQ"/>
	<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Nsfreetds_FAQ&amp;action=history"/>
	<updated>2026-04-25T16:28:28Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Nsfreetds_FAQ&amp;diff=2785&amp;oldid=prev</id>
		<title>WikiSysop: imported from WiKit id 62</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Nsfreetds_FAQ&amp;diff=2785&amp;oldid=prev"/>
		<updated>2004-09-02T19:19:41Z</updated>

		<summary type="html">&lt;p&gt;imported from WiKit id 62&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Here is the list of Frequently Asked Questions (FAQ) for the Panoptic FreeTDS driver for AOLserver, otherwise known as [[nsfreetds]].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''1.  What do I need in order to get started?'''&lt;br /&gt;
* [http://www.freetds.org/ FreeTDS 0.62.1]&lt;br /&gt;
* [[nsfreetds]] 0.4 driver&lt;br /&gt;
&lt;br /&gt;
Download the nsfreetds driver from SourceForge: [http://aolserver.com/downloads/nsfreetds-0.4-src.tar.gz nsfreetds-0.4-src.tar.gz]&lt;br /&gt;
&lt;br /&gt;
Verify that FreeTDS is built correctly by running &amp;quot;make check&amp;quot; which runs the acceptance tests that are part of FreeTDS.  (Make sure to edit the file &amp;quot;PWD&amp;quot; in the root of the FreeTDS source tree appropriately.)  This will also help verify that your &amp;quot;interfaces&amp;quot; file is correct.&lt;br /&gt;
&lt;br /&gt;
I built FreeTDS with the following args to the configure script:&lt;br /&gt;
&lt;br /&gt;
  ./configure --prefix=/usr/local --with-tdsver=7.0 --enable-msdblib --enable-dbmfix&lt;br /&gt;
&lt;br /&gt;
Make sure you set the SYBASE environment variable to point to the root of the FreeTDS installation (in my case, SYBASE=/usr/local), even if you're connecting to Microsoft SQL Server only.&lt;br /&gt;
&lt;br /&gt;
Configuring AOLserver is more difficult, as it requires getting the nsd.tcl right.  This is the real &amp;quot;quick and dirty&amp;quot; guide to configuring a datasource under AOLserver:&lt;br /&gt;
* In section ns/db/drivers, add a line &amp;quot;ns_param freetds nsfreetds.so&amp;quot;, like this:&lt;br /&gt;
&lt;br /&gt;
   ns_section &amp;quot;ns/db/drivers&amp;quot;&lt;br /&gt;
   ns_param freetds nsfreetds.so&lt;br /&gt;
&lt;br /&gt;
(Change &amp;quot;.so&amp;quot; to &amp;quot;.dll&amp;quot; or whatever the appropriate file extension is for your platform for dynamically linked files.)&lt;br /&gt;
* In section ns/db/pools, add a line &amp;quot;ns_param freetds freetds_pool&amp;quot;, ilke this:&lt;br /&gt;
&lt;br /&gt;
   ns_section &amp;quot;ns/db/pools&amp;quot;&lt;br /&gt;
   ns_param freetds freetds_pool&lt;br /&gt;
* Create a section ns/db/pool/freetds, like this:&lt;br /&gt;
&lt;br /&gt;
   ns_section &amp;quot;ns/db/pool/freetds&amp;quot;&lt;br /&gt;
   ns_param driver       freetds&lt;br /&gt;
   ns_param connections  1&lt;br /&gt;
   ns_param user         &amp;lt;your-database-user-here&amp;gt;&lt;br /&gt;
   ns_param password     &amp;lt;your-database-password-here&amp;gt;&lt;br /&gt;
   ns_param datasource   &amp;lt;your-datasource-name-here&amp;gt;&lt;br /&gt;
   ns_param verbose      off&lt;br /&gt;
* Create a section ns/server/${servername}/db, like this:&lt;br /&gt;
&lt;br /&gt;
   ns_section &amp;quot;ns/server/${servername}/db&amp;quot;&lt;br /&gt;
   ns_param Pools *&lt;br /&gt;
   ns_param DefaultPool freetds&lt;br /&gt;
&lt;br /&gt;
Some caveats -- datasource is case-sensitive, at least when connecting to a Sybase server.  Datasource is the name of the database as per the &amp;quot;interfaces&amp;quot; file.  You may want to raise the connections parameter to be more than 1, but for testing setting it to 1 may be better.&lt;br /&gt;
&lt;br /&gt;
'''2.  What databases work with the driver?'''&lt;br /&gt;
&lt;br /&gt;
The following configurations have been tested with nsfreetds-0.1pre and FreeTDS 0.51:&lt;br /&gt;
* x86/Linux-2.2.18 AOLserver-3.3.1 =&amp;gt; x86/WinNT-4.0 SQL Server 7 (tds7.0)&lt;br /&gt;
* x86/Linux-2.2.18 AOLserver-3.3.1 =&amp;gt; x86/WinNT-4.0 SQL Server 7 Service Pack 2 (tds7.0)&lt;br /&gt;
* x86/Linux-2.2.18 AOLserver-3.3.1 =&amp;gt; x86/Win2000 SQL Server 7 (tds7.0)&lt;br /&gt;
* x86/Linux-2.2.18 AOLserver-3.3.1 =&amp;gt; SPARC/Solaris-2.6 Sybase ASE 11.9.2 (tds4.2)&lt;br /&gt;
* SPARC/Solaris-2.6 AOLserver-3.3.1 =&amp;gt; x86/Win2000 SQL Server 2000 (tds4.2)&lt;br /&gt;
&lt;br /&gt;
The following configurations have been tested with nsfreetds-0.2 and FreeTDS 0.53:&lt;br /&gt;
* x86/Linux-2.4.17 AOLserver 3.4.2 =&amp;gt; ???/??? Sybase ASE 11 (tds5.0)&lt;br /&gt;
* x86/Redhat-7.2 AOLserver 3.4.2 =&amp;gt; x86/??? SQL Server 2000 (???)&lt;br /&gt;
&lt;br /&gt;
The following configurations have been tested with nsfreetds-0.2 and FreeTDS 0.53-CVS-snapshot:&lt;br /&gt;
* x86/Redhat-7.2 AOLserver-??? =&amp;gt; x86/WinNT-4.0 SQL Server 2000 (???)&lt;br /&gt;
&lt;br /&gt;
The following configurations have been tested with nsfreetds-0.4 and FreeTDS 0.62.1:&lt;br /&gt;
* x86/NetBSD 2.0_BETA AOLserver-4.0.7 =&amp;gt; Sybase ASA 8 (tds 5)&lt;br /&gt;
&lt;br /&gt;
In order to connect to SQL Server 7, use the TDS7.0 protocol (set this in the &amp;quot;interfaces&amp;quot; file).  To connect to Sybase 11.x or SQL Server 2000, use the TDS4.2 protocol (again, set in the &amp;quot;interfaces&amp;quot; file).&lt;br /&gt;
&lt;br /&gt;
'''3.  Known Problems'''&lt;br /&gt;
* There is limited support for datatypes.  LOB support (via TEXT columns) is in place, but not very well tested.&lt;br /&gt;
* Support for Stored Procedures is incomplete using the ns_db sp_* API.&lt;br /&gt;
* There's a bizarre &amp;quot;Notice: &amp;quot; segfault bug under 4.0b1 (from CVS).&lt;br /&gt;
* There may be some real bad thread-safety issues.&lt;br /&gt;
* Concurrent connections (ns_param connection &amp;gt; 1) has not been tested well.&lt;br /&gt;
* Multiple result-sets not handled properly (at least Sybase can return multiple result-sets, one after another, with a no-more-rows in between result-sets).  Will probably solve this by adding a way to detect additional result-sets to the [[nsfreetds API]].&lt;br /&gt;
&lt;br /&gt;
'''3.1.  Question:  convert(datetime) fails with the error &amp;quot;The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.&amp;quot;  Why?'''&lt;br /&gt;
&lt;br /&gt;
The default language for the database user specifies a different date format than is being passed to the convert().  For instance, if you get the error when doing this:&lt;br /&gt;
&lt;br /&gt;
   convert(datetime, '12/31/1999')&lt;br /&gt;
&lt;br /&gt;
then, chances are you're assuming mm/dd/yyyy while the default language's date format is dd/mm/yyyy.  You can find out what your default language is by executing this query:&lt;br /&gt;
&lt;br /&gt;
   SELECT name FROM master.dbo.syslanguages WHERE langid = @@default_langid&lt;br /&gt;
&lt;br /&gt;
You can change the default language (for example, to us_english) using this SQL statement:&lt;br /&gt;
&lt;br /&gt;
   sp_defaultlanguage &amp;lt;username&amp;gt; us_english&lt;br /&gt;
&lt;br /&gt;
Replace &amp;lt;username&amp;gt; with the name of the user whose default language you wish to change.  The sp_helplanguage stored procedure may help you choose which language you want to use, or the following query will list all the different language names:&lt;br /&gt;
&lt;br /&gt;
   SELECT name FROM master.dbo.syslanguages&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
		
	</entry>
</feed>