Skip to Content.
Sympa Menu

freetds - Re: [freetds] severely lost with Perl/FreeTDS/ODBC/MSSQL

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Robert Dobbs" <bobisdobbs AT hotmail.com>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] severely lost with Perl/FreeTDS/ODBC/MSSQL
  • Date: Wed, 06 Sep 2006 10:25:52 -0700



Robert Dobbs wrote:
> The docs have
> instructions on how to set up JDBC for Sybase ODBC
> connections, but they don't give an example for doing
> the same thing with an MS-SQL server.

Let's try it the other way around. You have a working freetds.conf, yes?
Show us the appropriate entry, your odbc.ini, and your connection string.
Also, I'd like to know what kind of an ODBC setup you want (DSN-less,
-only, combined).

I figured it out yesterday from an old post. Thanks to Christian Jung on 2003-11-26.

We try very hard to make the documentation clear, so I'm always interested
to learn where someone goes astray.

For me it was a lot of in-depth discussion of how the system works but a lack of specific examples on how to set it up if I was in a hurry facing a deadline.

For posterity, here are example entries from the files I needed to get FreeTDS/ODBC/MS SQL Server 200* working.

;; /etc/odbc.ini or equiv
[mydb]
Driver = FreeTDS
Description = my mssql db
Trace = No
Servername = mydb_freetdsconf_entry
Database = mydatabase

;; /etc/odbcinst.ini or equiv
[FreeTDS]
Driver = /usr/lib/odbc/libtdsodbc.so
Setup = /usr/lib/odbc/libtdsS.so

;; /etc/freetds/freetds.conf or equiv
; ... defaults ...
[mydb_freetdsconf_entry]
host = myserver.mydomain.foo
port = 1433
tds version = 8.0


> I had things set up using FreeTDS with DBD::Sybase to
> connect to MSSQL, and it even worked with DBIx::Class
> to create rows... then golly gee, when it tried to
> update, it uses placeholders, so I got a segfault:
> "ct_send(CS_DESCRIBE_INPUT) returned 0 at
> /usr/lib/perl5/DBD/Sybase.pm line 124."

Yep, sorry. That's documented not to work. For Microsoft servers, we'd
need SQL parser.

If it doesn't work for routine DBI operations like ? placeholders, why is it documented at all, other than to say "don't use it"?

Thanks.

Mark

_________________________________________________________________
Search from any web page with powerful protection. Get the FREE Windows Live Toolbar Today! http://get.live.com/toolbar/overview





Archive powered by MHonArc 2.6.24.

Top of Page