I've tried adding a "command.EndExecuteNonQuery" at the end of the backup section,
And what should that be good for?
The execution automatically ends when the backup has finished.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I am trying to create a program that will back up a database, and then restore this backup to a different name (orginalDatasbaseName_training).
The backup part works Ok, but when this finishes I get a "'EndExecuteNonQuery' cannot be called more than once", and when the Training creation process starts also, then I get the same message.
I've tried adding a "command.EndExecuteNonQuery" at the end of the backup section, and putting the training creation put into its own connection ( and the opening and closing of a connection after each of the training procedures SQL lines), but I still get the same error.
214689-creatingtrainingdb.txt
Many Thanks
Nb: file attached as I was unable to copy code into Post.
I've tried adding a "command.EndExecuteNonQuery" at the end of the backup section,
And what should that be good for?
The execution automatically ends when the backup has finished.
Hi,
but after the backup it produces the "'EndExecuteNonQuery' cannot be called more than once for the same execution." message , and if an option is ticked, when its tried to recover the newly created backup into another database, it fails with the same message.
many thanks to everyone. I believe I have resolved this (too many EndExecuteNonQuery lurking in the code. :-)