Command can't be used as delta command for dbo.taSubject

Hi,

If I define “InsertCommandName” property in Schema modeler and try to insert some data from client i got
server exception message “Command can’t be used as delta command for dbo.taSubject datatable: parameters mismatch”

Please for advice what i’m doing wrong.
Is there any documentation how to use SQL store procedure for insert/update/delete data ?

And one more question: Is it possible to use only one procedure for insert/update/delete with one adition parameter
like @UpdateType (“I”… insert, “U”… update, “D”… delete) ?

Thanks for advance.

Edvin

Hello Edvin,

Please, check names of your procedure parameters. They should be just the same as field names of data table in the schema. You could use not all the field names as parameters, but it is not allowed to add the new ones. That is why it is not possible to use only one procedure for insert/update/delete with one addition parameter

like @UpdateType (“I”… insert, “U”… update, “D”… delete).

In this case you could use the way proposed in our Business Processor sample: to intercept the generation of the update command and replace the autogenerated SQL statement with a custom one.

Hope this helps

Hi. Thank you for your ansere. It helps !