Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Sybase.ASEOLEDBProvider.2 and .NET and DAAB and stored procedures

28 views
Skip to first unread message

robertoperez

unread,
Apr 21, 2008, 4:32:02 PM4/21/08
to
Hello Paul,

I apologize for taking so long. I am posting a new message
because I am able to execute stored procedure using OLE DB.
There I will explain in more details.

> Hi Roberto,
>
> What version of the Provider?
> You're using the OEM Provider from teh older Sybase 12.5.1
> SDK. Sybase has an "organic" provider available in current
> SDK 12.5.1 and 15.0 releases.
>
> The OEM Provider isn't supported in the .NET environment.
> There are some unpredictable behaviors.
> If you want - you can use something like RIBO to collect
> the TDS to see what the problem is,
> but it'll be difficult to get support for this provider.
>
> The organic provider is supported in .NET.
>
> The problem sounds like the ASE is expecting another
> parameter. Not sure why.
>
> -Paul
>
> <Roberto Perez> wrote in message
> news:47daa057.7bc...@sybase.com... >I am using VS
> > 2005 C# and framework 2 to connect to Sybase using Ase
> > ADO, ODBC and OLE DB, all three are working and
> > connecting. For ODBC and OLE DB I am using MS
> Enterprise Data Access Block June 2006 and able to execute
> > complex dynamic SQL. My problem is OLE DB only when it
> > is trying to execute stored procedures. The error
> > messages that I am getting is "No value given for one or
> > more required parameters".
> >
> > My connection string is as follow:
> > <add name="SybaseOLEDB"
> >
> >
> connectionString="Provider=Sybase.ASEOLEDBProvider.2;
> > Server Name=<ip address>; Server
> > Port Address=<port number>;
> > Initial Catalog=,database name>;
> > User ID=<user id>;
> > Password=<password>;"
> providerName="System.Data.OleDb" /> >
> > The function that I am using to execute a simple stored
> > procedure is below where the same code it suppose to
> > work for ODBC and OLD DB:
> > public String ExecStoredProcOleDbOdbc(String
> > sConnection) {
> > String sCommand = = "{ call
> > sp_show_individuals(?)}"; String sReturn =
> > String.Empty; Database db =
> > DatabaseFactory.CreateDatabase(sConnection);
> > DbCommand command =
> > db.GetSqlStringCommand(sCommand); int myInt =
> > 525789; command.CommandType =
> > CommandType.StoredProcedure;
> > db.AddInParameter(command, "@i_id_dss", DbType.Int32,
> > myInt); try {
> > ds = new DataSet();
> > ds = db.ExecuteDataSet(command);
> > sReturn = ds.GetXml();
> > } catch (Exception ex) {
> > throw ex;
> > } finally {
> > if (ds != null) {
> > ds.Clear();
> > ds.Dispose();
> > }
> > if (command != null) command.Dispose();
> > }
> > return sReturn;
> > }
> >
> > I will appreciate any comment or suggestion but the
> > solution will be welcome. Shoot me an email at
> robert...@ky.gov
>
>

0 new messages