Executing stored procedures as CommandType=Text
From: Elton Wang (anonymous_at_discussions.microsoft.com)
Date: 02/25/05
- Next message: Dumitru Sbenghe: "Re: Close() and Dispose()"
- Previous message: triptiasawa: "ERROR IN ORACLE CONNECTION"
- In reply to: Gavin G. Jones: "Executing stored procedures as CommandType=Text"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 25 Feb 2005 07:51:22 -0800
Hi Gavin,
I don't think it is problem of sql query. It's OK to
execute "exec spName 'parameter1', 'parameter2', ." or
even simply "spName 'parameter1', 'parameter2', ." in
command or dataadapter.
You might need to check the connection ot connection
string.
HTH
Elton Wang
elton_wang@hotmail.com
>-----Original Message-----
>I've got an urgent problem - I'm converting a legacy VB
app to .NET.
>
>I've got thousands of pre-saved strings such as "exec
sp_name 'p1', 'p2',
>'p3'" that execute on a VB 6 application and ADO.
>
>These now need to execute on C# and ADO.NET.
>
>I receive the SQL requests in the string format with all
the parameters
>filled in, so I can't use the strongly typed version of
the SQLCommand
>object's CommandType=StoredProcedure, it's got to be
CommandType=Text.
>
>....
>SqlDataAdapter da = new SQLDataAdapter("exec
sp_name 'p1','p2','p3'", cn );
>da.Fill(ds);
>....
>
>When I try to fill my DataSet I get a SQLException -
"System Error".
>
>I can see that the stored procedure executes from within
the SQL Profiler.
>
>This worked fine under ADO.
>
>Should I ditch ADO.Net and use an interop to ADO?
>
>Can anyone help on this?
>
>Regards,
>Gavin G. Jones
>
>
>
>.
>
- Next message: Dumitru Sbenghe: "Re: Close() and Dispose()"
- Previous message: triptiasawa: "ERROR IN ORACLE CONNECTION"
- In reply to: Gavin G. Jones: "Executing stored procedures as CommandType=Text"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|