[freetds] Begginer question aboutbinding parameterswith placeholders
Lowden, James K
james.k.lowden at alliancebernstein.com
Fri Jun 9 10:12:49 EDT 2006
> From: Maxime MARAIS
> Sent: Friday, June 09, 2006 4:46 AM
>
> ZIGLIO, Frediano, VF-IT a écrit :
>
> > This is not 100% accurate... you were using CTlib (via DBD::Sybase)
> > to access mssql and we suggested to either try to update FreeTDS
> > or use ODBC (via DBD::ODBC) which has better placeholder support.
> > And I still encourage you to try ODBC.
>
> I am also
> not able to use ODBC as there is no free module to access mssql
> from Perl but DBD::Sybase.
Methinks I detect a misunderstanding....
FreeTDS includes an ODBC driver, licensed LGPL. You can use it with or without a Driver Manager (DM). Two popular DMs exist: iODBC and unixODBC. They are IIRC licensed BSD and GPL respectively, both free software in my book. ;-)
> I must use the tds protocol
> to exchange data with the database server and no other protocol.
When you use the FreeTDS ODBC driver, you are communicating with the server via TDS, just as you do with the other FreeTDS libraries. That is, whether you use FreeTDS with DBD::ODBC or with DBD::Sybase, the server sees almost no difference. (The difference is a single bit in the login packet.)
Regarding placeholders, the different APIs make different demands on the server and underlying library, libtds.
The ct-lib placeholder functionality requires SQL parsing, which Sybase provides to the driver from the server. FreeTDS ct-lib placeholders won't work on Microsoft servers unless and until FreeTDS (or Microsoft) adds that feature. You and I may be old and gray before that happens, but one never knows. Getting placeholders to work for Sybase servers is a more straightforward task, just not something anyone's volunteered for yet.
The ODBC placeholder functionality works now because it doesn't have the same requirements. That's not too surprising, given that Microsoft promulgated the ODBC standard and supports it on its own servers.
> Nevertheless, my problem is now resolved : I don't use placeholders
> anymore. ;-)
That's perfectly fine, of course. I never use placeholders myself, and I don't particularly like the ODBC API. But it *does* offer placeholders, and they do work! At least most of the time....
Regards,
--jkl
-----------------------------------------
The information contained in this transmission may be privileged and
confidential and is intended only for the use of the person(s) named
above. If you are not the intended recipient, or an employee or agent responsible
for delivering this message to the intended recipient, any review, dissemination,
distribution or duplication of this communication is strictly prohibited. If you are
not the intended recipient, please contact the sender immediately by reply e-mail
and destroy all copies of the original message. Please note that we do not accept
account orders and/or instructions by e-mail, and therefore will not be responsible
for carrying out such orders and/or instructions. If you, as the intended recipient
of this message, the purpose of which is to inform and update our clients, prospects
and consultants of developments relating to our services and products, would not
like to receive further e-mail correspondence from the sender, please "reply" to the
sender indicating your wishes. In the U.S.: 1345 Avenue of the Americas, New York,
NY 10105.
More information about the FreeTDS
mailing list