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:
01065686
Views:
16
>Are you using a custom data access class?

No. DataAccessSql

Is this the insert, update or delete >statement?

Update.


Database, TableName and PrimaryKey are all set for the Business object.


For an example, the following code throws the exception on the second update. It does not matter which update statement comes first, the second one always throws the exception.
public void test(string cidSuggest, DateTime date, int iEntryStepNum)
{

	string cmd = "SELECT cidSuggest, iEntryStepNum, tLastUpd FROM suggest WHERE cidSuggest = '"+cidSuggest+"'";

	DataSet dsSuggest = GetDataSet(cmd);
	dsSuggest.Tables[0].Rows[0]["iEntryStepNum"] = iEntryStepNum;
	dsSuggest.Tables[0].Rows[0]["tLastUpd"] = DateTime.Now;
	mmSaveDataResult result = SaveDataSet();


	cmd = "SELECT cidSuggest, tEntered, tLastUpd FROM suggest WHERE cidSuggest = '"+cidSuggest+"'";

	dsSuggest = GetDataSet(cmd);
	dsSuggest.Tables[0].Rows[0]["tEntered"] = date;
	dsSuggest.Tables[0].Rows[0]["tLastUpd"] = DateTime.Now;
	result = SaveDataSet();

}
Would calling the method ExecScalar() in the HookPreSave alter the Data Access Object so it generates the incorrect update command? I'm not performing anything like this in this case, just woundering if it could cause a problem?


Thanks for the responses. Any Ideas??
-Douglas H.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform