Skip to Content.
Sympa Menu

freetds - Re: [freetds] Begginer question about binding parameters with placeholders

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: KERTEL - Maxime MARAIS <mmarais AT kertel.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Begginer question about binding parameters with placeholders
  • Date: Thu, 08 Jun 2006 23:36:26 +0200

Leandro Conde a écrit :

Greetings people! Hi all:

My name is Leandro, and I'm a beginner in the FreeTDS library world,

First of all: thanks you all for producing this excellent product.
It's really nice!

Situation:
I'm trying to create a simple program written in C++ that issues some
simple data operations (SELECT, and INSERTs mostly) to a MSSQL 2000
server.

Problem:
I'm found some problems while executing prepared statements with
parameters binded using placeholders.

[...]

Thank you for any help! And please forgive me if this problem is a
known issue or something, I've really done some research and found
nothing about it.


Hello Leandro,

I discussed about this topic a few days ago, facing the same problem with Perl scripts. It appears FreeDTS does not support placeholders and you cannot use prepare ans execute as you would do with ODBC. I solved my problem by placing values directly in my sql queries, even if this is less secure, particulary when you have to built queries with data coming from user inputs (you have to escape simple-quotes, for example, or check typed values are numbers when some numeric fields are expected).

Maybe this will be solved or implemented in next versions.

Regards.

--
Max.





Archive powered by MHonArc 2.6.24.

Top of Page