Using parameterized queries with ASA8 OLE DB Provider (via .NET) -
01-18-2004
, 11:51 AM
I am using parameterized SELECT queries for the first time in Sybase, and I
am having trouble getting the syntax straight (I think...).
I looked at the documentation and tried the following:
PARAMETERS myParam;
SELECT *
from table1
where id = {myParam};
This, however, gave me a syntax error when using the OLE DB Provider via
..NET (I set the parameter value in .NET). I tried the "@myParam" syntax
that .NET uses in their examples, and got "@myParam" not a column.
What is the preferred way to do this? I am assuming that the ASA8 OLE DB
Provider for Sybase will handle parameterized queries!!
Thanks in advance. |