How to execute a stored proc directly from a .NET IDataAbstractService object

For now I have some code that does something in case IDataAbstractService is DataAbstractService but it throws an exception : “expects parameter ‘@Primkey’, which was not supplied.”

I tried both the parameter with and without @

Note: I am trying to call the MS SQL stored proc directly, I don’t have a command in my DA schema

Hi,

I can suggest to use Connection.GetCommandParams(..., true) instead of creating params with SchemaParametercollection.

it calls BaseConnection.GetStoredProcedureParams internally and should returns all parameters of SP.

Hi,

The GetCommandParams works but I still have the same issue when I call ExecuteScalar

Is ExecuteScalar the correct function for SP? Should I use ExecuteNonQuery?

Note: Maybe an alternative approach exists. Can I acquire a System.Data.SqlClient connection from the IDataAbstractService

Hi,

we use ExecuteNonQuery internally. You can see usage of it in DataAbstractService.InternalExecuteCommand.

Does this SP work w/o DataAbstract code?

Can you should DDL of this SP?

You can drop email to support@ for keeping privacy.

Yes,

this SP is in use for many years.

The GetStoredProcedureParams returns 3 parameters

We use it in our delphi RO server (where we made it a command)

Hi,

will this SP work if it is called with standard RemoteCommand / LocalCommand?