[freetds] Begginer question about binding parameters with placeholders

KERTEL - Maxime MARAIS mmarais at kertel.com
Thu Jun 8 17:36:26 EDT 2006


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.



More information about the FreeTDS mailing list