All,
I am getting the following runtime error when I click the save button on my web form:
"OleDbCommand.Prepare method requires all parameters to have an explicitly set type."
Here is the stack trace:
[InvalidOperationException: OleDbCommand.Prepare method requires all parameters to have an explicitly set type.]
System.Data.OleDb.OleDbParameter.Prepare(OleDbCommand cmd)
System.Data.OleDb.OleDbCommand.PrepareCommandText(Int32 expectedExecutionCount)
System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)
System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
System.Data.Common.CommandBuilder.BuildCache(Boolean closeConnection)
System.Data.Common.CommandBuilder.GetInsertCommand()
System.Data.OleDb.OleDbCommandBuilder.GetInsertCommand()
OakLeaf.MM.Main.Data.mmDataAccessOleDb.CreateInsertCommand()
OakLeaf.MM.Main.Data.mmDataAccessOleDb.SaveDataSet(DataSet ds, String tableName, String primaryKeyName, Boolean retrieveAutoIncrementPK, IDbDataAdapter dbAdapter)
OakLeaf.MM.Main.Business.mmBusinessObject.SaveDataSet(DataSet ds, String tableName, String databaseKey, IDbDataAdapter dbAdapter)
OakLeaf.MM.Main.Business.mmBusinessObject.SaveDataSet(DataSet ds, String tableName, String databaseKey)
OakLeaf.MM.Main.Business.mmBusinessObject.SaveDataSet(DataSet ds, String tableName)
OakLeaf.MM.Main.Business.mmBusinessObject.SaveDataSet(DataSet ds)
OakLeaf.MM.Main.Web.UI.mmBusinessWebPage.Save(mmBusinessObject bizObj, DataSet ds, String tableName)
Excl.ArtApp.OrderEdit.btnSave_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\artapp web csharp\orderedit.aspx.cs:201
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()
The error happens when I am executing this line of code in the mmSaveDataResult method of mmBusinessWebPage.
result = bizObj.SaveDataSet(ds)
where ds = {OakLeaf.MM.Main.Data.mmDataSet}
I am calling this from:
if (this.Save(this.oSomast99, dsSomast , this.oSomast99.TableName) ==
mmSaveDataResult.RulesPassed)
dsSomast was created with :
DataSet dsSomast = (DataSet)Session["dsSomast"];
As best that I can tell the variable "ds" has an explicit type of DataSet. I am using VS2003 with MM.Net 1.4.2 My application is using a VFP 8.0 DBC as the backend database. I can load the data into a grid and I can select and retrieve the data into an edit form much like the one in the Jump Start sample, so I don't think that the connection to the data is the problem, but I could be wrong.
I don't know what else to post here that would help to debug this, but if anyone needs more info, let me know.
Thanks in advance.