PC Review Forums Newsgroups Microsoft DotNet Microsoft ADO .NET OleDbCommandBuilder unexpected behavior

Reply

OleDbCommandBuilder unexpected behavior

 
Thread Tools Rate Thread
Old 07-04-2006, 07:34 PM   #1
Prodip K Saha
Guest
 
Posts: n/a
Default OleDbCommandBuilder unexpected behavior


Here is my scenario- I have two stored procedures in Sybase with same name
with different ownership. Normally, I have only one procedure with dbo
ownership but today I have another procedure with non-dbo owner. That's
where the problem starts. I am using .Net Framework 1.1 with this app.

When I use OleDbCommandBuilder.DeriveParameters(cmd); //OleDbCommand cmd;
It get paqrameters from both stored procedures. The count is exacttly
duplicated (26) since I have same number (13) of parameters in both the
procedures.

Workaround: Build the command with owner.procedure_name as oppose to just
the procedure_name.

I just wanted to share this information with you all.

Thanks,
Prodip



  Reply With Quote
Old 08-04-2006, 07:56 AM   #2
Cor Ligthert [MVP]
Guest
 
Posts: n/a
Default Re: OleDbCommandBuilder unexpected behavior

Prodip,

Thanks,

Cor

"Prodip K Saha" <psaha@bear.com> schreef in bericht
news:%23qbYbHnWGHA.3848@TK2MSFTNGP05.phx.gbl...
> Here is my scenario- I have two stored procedures in Sybase with same name
> with different ownership. Normally, I have only one procedure with dbo
> ownership but today I have another procedure with non-dbo owner. That's
> where the problem starts. I am using .Net Framework 1.1 with this app.
>
> When I use OleDbCommandBuilder.DeriveParameters(cmd); //OleDbCommand cmd;
> It get paqrameters from both stored procedures. The count is exacttly
> duplicated (26) since I have same number (13) of parameters in both the
> procedures.
>
> Workaround: Build the command with owner.procedure_name as oppose to just
> the procedure_name.
>
> I just wanted to share this information with you all.
>
> Thanks,
> Prodip
>
>
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

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