NetBSD, dblib, and TDS 7.0

Lowden, James K LowdenJK at
Tue Aug 29 16:14:51 EDT 2000

Stephen (& Co.?):

By modifying one Makefile line to read:

	CONFIGURE_ARGS= --prefix=${PREFIX}/freetds --with-tdsver=7.0

and rebuilding and reinstalling, the sample code now works against my SQL

The TDSVER variable has to be put in the FAQ!  It's magical.  If I set it to
50 I can talk to Sybase; if I set it to 70 I can talk to Microsoft.  Other
combinations lead to the weary "Unknown marker" errors.  

My goal is to get the perl Sybase::BCP module to work with freetds to load a
Microsoft server.  As far as I can tell, no one creating those programs
expected that precise arrangement, but it sure looks like it might work.
I'd rather do what you did and use DBI, but there's no bulk-load support in

Thanks again for your help.  Just knowing it "should oughta" work made it
seem worth trying, and I doubt I would have discovered "export TDSVER=70" if
you hadn't pointed it out.  


-----Original Message-----
From: Stephen Arehart [mailto:sarehart at]
Sent: August 29, 2000 2:16 PM
To: TDS Development Group
Subject: [freetds] RE: NetBSD, dblib, and TDS 7.0

    I saw this yesterday.
    Did you compile the module --with-tdsver=7.0?
    Did you create an environment variable called TDSVER and set it to 70
    set TDSVER=70
    export TDSVER
    (i did that in bash).
    The environment variable thing is not documented (at least I didn't find
it), but someone on the freetds mailing list did (I think it was Robert
Brown, around the 18th of January of this year - search the archives for
"Unknown Marker: !!0" and it should show up).
    I was able to get perl scripts to talk to sql server via DBI and
DBD:Sybase using the FreeTDS approach on OpenBSD 2.6, so give the
environment variable settings a try. I also posted an explanation to the DBI
users list yesterday as well. Please feel free to email me off-line if you
would like to see a copy of what I sent.
    Good luck!

Stephen V. Arehart
Database Application Development
Software Engineering
Cellomics, Inc.
mailto: sarehart at <> 


-----Original Message-----
From: Lowden, James K [mailto:LowdenJK at]
Sent: Tuesday, August 29, 2000 1:12 PM
To: TDS Development Group
Subject: [freetds] NetBSD, dblib, and TDS 7.0

Hello all, 

I've installed the TDS 0.5 package on NetBSD, and have successfully
connected to a Sybase server.  I'm now trying to connect to MS SQL Server
7.0, and am getting the dreaded "Unknown token !!" error.  In the samples,
"dbtest" fails with this error (and never exits); "tdstest" succeeds without
complaint.  (I did modify them to use my server and query).  

I attempted to pass the --with-tdsver=7.0 flag into the make, and it didn't
complain, but I don't know how to check if it had the desired effect.  I've
written code for 15 years, but I'm new to the NetBSD environment.  

        Is my particular constellation of software known to work?  

If it is, how do I check that my build is properly configured?  

If it's either not known to work or known not to work, I'm happy to turn on
the logging/debugging features and work my way through it, but apparently
there's more involved than just modifying the source in
"work/freetds/src/tds" and typing "make install" again.  If someone wouldn't
mind holding my hand through some of the basics, I might be of some use.  

Thanks in any case.  


You are currently subscribed to freetds as: LowdenJK at
To unsubscribe, forward this message to
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the FreeTDS mailing list