G
Gavin G. Jones
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
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