dbTalk Databases Forums  

Using parameterized queries with ASA8 OLE DB Provider (via .NET)

comp.databases.sybase comp.databases.sybase


Discuss Using parameterized queries with ASA8 OLE DB Provider (via .NET) in the comp.databases.sybase forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Michael Post
 
Posts: n/a

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





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.