Home > Archive > Sybase ODBC > May 2005 > OdbcCommand OdbcParameter









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author OdbcCommand OdbcParameter
tham

2005-05-04, 9:23 am

anyone have sample source code about passing parameter to
command object or executing store procedure using ODBC(ASE)
especially in .net

i found problem like below msg even i added all parameters
to command object
ERROR [HY000] [DataDirect][ODBC Sybase Wire Protocol
driver][SQL Server]Procedure sp_InsertExpenseCate
gories
expects parameter @Name
Paul

2005-05-04, 11:23 am

Hi,

There are samples included with the Sybase ASE ADO.NET Provider (native
provider) which I recommend that you use instead of the Sybase ASE ODBC
Driver:

1. The vendor of this driver will not support its use in .NET apps

2. The driver also does not support named parameters and this could be the
reason for the failure. The nativer Provider does support named parameters.

pv

<tham> wrote in message news:4278d554.646f.1681692777@sybase.com...
> anyone have sample source code about passing parameter to
> command object or executing store procedure using ODBC(ASE)
> especially in .net
>
> i found problem like below msg even i added all parameters
> to command object
> ERROR [HY000] [DataDirect][ODBC Sybase Wire Protocol
> driver][SQL Server]Procedure sp_InsertExpenseCate
gories
> expects parameter @Name



tham

2005-05-05, 3:23 am

Thanks to Mr. Paul

The reason i need to use ASE ODBC becuase my client need
that
my application should support any DB so i use ODBC .net
using ASE ODBC driver do connection. Actually i might use
any standard connection such as OLEDB,ODBC.

do u have any suggestion in this case.?
finally which one should i use for connection.
ODBC,OLEDB,ASE ADO.net

if i really need to use ODBC,do i have any way around to
pass parameter in command object as i asked in this topic.
Paul

2005-05-05, 11:23 am

Hi Tham,

For starters the ODBC driver does not support named parameters.

If you install the current OCS SDK (preferably EBF 12378 ESD07) we install
the ASE ADO.NET Provider, the odbc and oledb. In the ADO.NET directory
(%SYBASE%\ADO.NET) there are sample applications that you can look at to get
an idea on how to do this.

If you do not use named parameters this will probably work with ODBC but it
is unpredictable.

-Paul

<tham> wrote in message news:4279a039.68e0.1681692777@sybase.com...
> Thanks to Mr. Paul
>
> The reason i need to use ASE ODBC becuase my client need
> that
> my application should support any DB so i use ODBC .net
> using ASE ODBC driver do connection. Actually i might use
> any standard connection such as OLEDB,ODBC.
>
> do u have any suggestion in this case.?
> finally which one should i use for connection.
> ODBC,OLEDB,ASE ADO.net
>
> if i really need to use ODBC,do i have any way around to
> pass parameter in command object as i asked in this topic.



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com