[freetds] ODBC configuration dialog on Windows
tom.rogers at ccur.com
Mon May 3 10:15:25 EDT 2004
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.
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.
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)
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
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
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
More information about the FreeTDS