Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exception when saving
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01065248
Message ID:
01066065
Views:
16
Hi Kevin,

Thanks for the response.

I switched to using parameterized queries and that did not fix the problem.

I placed a break point where you suggested and the Command Text for the first save is as follows:
"UPDATE suggest SET cidSuggest = @p1 , iEntryStepNum = @p2 , tLastUpd = @p3 WHERE ( (cidSuggest = @p4) AND ((@p5 = 1 AND iEntryStepNum IS NULL) OR (iEntryStepNum = @p6)) AND ((@p7 = 1 AND tLastUpd IS NULL) OR (tLastUpd = @p8)) )"
The Command Text for the second save is :
"UPDATE suggest SET cidSuggest = @p1 , iEntryStepNum = @p2 , tLastUpd = @p3 WHERE ( (cidSuggest = @p4) AND ((@p5 = 1 AND iEntryStepNum IS NULL) OR (iEntryStepNum = @p6)) AND ((@p7 = 1 AND tLastUpd IS NULL) OR (tLastUpd = @p8)) )"
It looks like they are identical.

Again the exception occurs on the second update and the message is:
Prepared statement '(@p1 char(16),@p2 int,@p3 datetime,@p4 char(16),@p5 int,@p6 int,' expects parameter @p2, which was not supplied.
After stepping through the save process, it looks like the CreateInsertCommand()
includes the iEntryStepNum field in the second save, although it was not included in the original command. The SelectCommand looks ok.


Is there a way to reset the CommandBuilder between each save?

Any other ideas?

Sincerely,
-Douglas H.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform