[freetds] ODBC configuration dialog on Windows

John Brandt Sr. pgmr at Experts.tzo.com
Mon May 3 11:45:58 EDT 2004

I'm sorry if I got in on the back end of this conversation, 
but am I to understand that someone has (or has attempted) 
to port MS SQL server to linux?
We have developed a generic ODBC Manager and Driver for AS/400
and iSeries to allow access to MSSQL, Sybase and are working on 
Oracle and MySQL FROM AS/400 and iSeries. If you have MSSQL 
running on linux, we would certainly like to validate our 
software against it, if at all possible.

Please let me know,
John Brandt

-----Original Message-----
From: Rogers, Tom [mailto:tom.rogers at ccur.com]
Sent: Monday, May 03, 2004 9:15 AM
To: 'FreeTDS Development Group'
Subject: RE: [freetds] ODBC configuration dialog on Windows


Do I understand that you "ported" (created, reverse engineered) your own
version of SQL Server to run on Linux?

If that is the case, I have a few questions related to that:

1. Why?  Seriously.  Why not use an existing Linux database that has a
supported ODBC driver (assuming there are some).

2. How function-filled are you going to make your database (Views, Stored
Procedures, Transactions, etc?)

3. What, if anything, did you use as a codebase?

Of course, if I misunderstood your initial post describing what you are
doing then the above questions are moot.


Thomas Rogers
System Engineer
Concurrent Computer Corporation
> phone: 215.712.7422 x7261
The information contained herein is proprietary and confidential and should
be treated in accordance with the Non-Disclosure Agreement and any
Amendments to said Agreement executed between the discloser and recipient.
If the reader of this message is not the intended recipient, you are hereby
notified that any dissemination, distribution, or copy of this information
is strictly prohibited.  If you have received this information in error,
please immediately notify discloser, and then destroy the information
contained herein.  Thank you.

-----Original Message-----
From: freetds-bounces at lists.ibiblio.org
[mailto:freetds-bounces at lists.ibiblio.org]On Behalf Of Steve Kirkendall
Sent: Sunday, May 02, 2004 2:09 PM
To: FreeTDS Development Group
Subject: Re: [freetds] ODBC configuration dialog on Windows

Before I begin my reply, here's some good news:  I have successfully used
Crystal Reports to pull data from my Linux box!  I read my first table
Saturday morning.  There's still a lot of work to do (for example, I can't
send error messages back yet) but this is a HUGE milestone!

Frediano Ziglio <freddyz77 at tin.it> wrote on Sunday, May 02, 2004:
> Il sab, 2004-05-01 alle 02:06, Steve Kirkendall ha scritto:
> > Quick recap: I'm writing a tiny SQL server to allow Windows workstations
> > to access data on a Linux box, so they can run Crystal Reports.  I was
> > trying to use the MS SQL Server ODBC driver because it is usually
> > installed on Windows workstations, and because it is pretty easy to
> > configure.  The FreeTDS ODBC driver can be compiled for Windows, but is
> > very hard to install and configure.
> > 
> I don't think it's so easy to write an installer program or enable
> registration of freetds.dll with regsrv32 (although this should register
> only COM classes :) )

I looked into that.  Null Soft, the company that wrote WinAmp, has created
a free installer-creator program named "NSIS".  I haven't had a chance to
try it out yet, but it's reassuring to know there are free alternatives to

For now, I'm just using a *.bat file which copies freetds.dll into the
appropriate directory and then runs ODBCINST to alert ODBC to the presence
of the new driver.  It's clunky and doesn't support automatic removal, but
it has met my needs so far.

> > 3) In the ODBC.INI information, what is the relationship between
> >    "Servername", "Server", and "Address"?  It looks like "Servername"
> >    is obsolete, "Server" identifies the host that ODBC should connect to
> >    (either as a domain name or a "numbers and dots" IP address), and
> >    "Address" is always the IP address in "numbers and dots" format.
> >    Is that right?  Why is "Address" stored in ODBC.INI?
> > 
> My suggestion is "forget servername" all users want real server name so
> use server. Is useful only if you use other libraries (ctlib/dblib).
> Also under windows freetds.conf is in c:\ ... not that fine.. "Address"
> was added for compatibility with MS ODBC and to solve DNS resolve
> problems (/etc/hosts is not editable to everyone...). I think there
> should be an "Advanced" button for "Address" and (if you require it)
> "Servername".

I use a TDSCONNECTINFO structure as the edit buffer.  It has no field
for storing "ServerName" so I ignore it.  In fact, I don't even have a
C:\FreeTDS.conf file.

Currently I prompt for "Server", and derive "Address" from that as part
of the validation testing.  It seems to work.  And you are allowed to
put a "numbers and dots" address in the "Server" field too, so you really
aren't losing any flexibility that way.

I was just uncertain about the fields' meanings because "Server" is
stored into the TDSCONNECTINFO.server_name field, and tds_alloc_connect()
gives that field the default value "SYBASE", which looks more like a
data source name than a DNS name.  That's important, because the values
of the TDSCONNECTINFO fields are used to populate the dialog's input
fields -- the user sees "SYBASE" as the default server name.  You might
consider changing the default to "localhost".

I don't want to add an [Advanced] button -- not yet, anyway.  Once other
people have a chance to see it and use it, we can easily go back and
modify it if necessary.

Oh, one other thing: I also added a login dialog.  In addition to the
prompts for user name and password, it also has a checkbox to enable
logging.  The log file is always "FreeTDS.log" on the desktop.  I added
this to the login dialog, instead of the configuration dialog, because
odbc_get_dsn_info() doesn't load the TDSCONNECTINFO.dump_file field.

odbc_get_dsn_info() DOES load "Language", "Domain", "TextSize", and
"PacketSize", none of which appear on my configuration dialog.  They
would be good candidates for an advanced dialog.

> > 4) The Windows resource file also stores a version number.  It's nice to
> >    see a version number in the ODBC drivers list, but I'm worried about
> >    maintenance.  Somebody would have to remember to go in and update the
> >    version number in the resource file whenever FreeTDS' version number
> >    changed.  Unless somebody knows an automated way to do that.
> See James reply.

When compiling with MSVC++, the configure script isn't used.  Is there a
script you use when building source distributions?  You could but the
command there.

Steve Kirkendall    |A:It is confusing, since people don't read that way
kirkenda at cs.pdx.edu |Q:Why is top-posting bad?
                    |A:It is adding comments to the top of a message
                    |Q:What is top-posting?
FreeTDS mailing list
FreeTDS at lists.ibiblio.org
FreeTDS mailing list
FreeTDS at lists.ibiblio.org

Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.665 / Virus Database: 428 - Release Date: 4/21/04

Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.674 / Virus Database: 436 - Release Date: 5/2/04

More information about the FreeTDS mailing list