[freetds] severely lost with Perl/FreeTDS/ODBC/MSSQL

James K. Lowden jklowden at freetds.org
Wed Sep 6 00:47:07 EDT 2006

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).

We try very hard to make the documentation clear, so I'm always interested
to learn where someone goes astray.  
> 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.  
> That's why I want to try FreeTDS with ODBC.  It works
> to use ? placeholders with ODBC, right?

Yes it does.  With ODBC you describe the parameter data type; with ct-lib
the library figures it out by (on Sybase) asking the server.  



More information about the FreeTDS mailing list