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