Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Saving Data to fpw26 free tables
Message
From
22/10/2003 14:06:11
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Saving Data to fpw26 free tables
Miscellaneous
Thread ID:
00841192
Message ID:
00841192
Views:
52
I have a Patient Edit form (aspx) that has a button btnSave. The click event is noted below. If the data tables are a part of a vfp database everything works great. Data is saved to the table when I press btnSave.
private void btnSave_Click(object sender, System.EventArgs e)
{
 DataSet dsPatient = (DataSet)Session["dsPatient"];
  if (this.Save(this.oPatient, dsPatient, this.oPatient.TableName) ==
    mmSaveDataResult.RulesPassed)
      {
	Response.Redirect("gmgWebPatients.aspx");
      }

}
The problem is that when I use free fpw26 tables in the same example, I receive the following error. And... it does not look good for saving data back to free tables. Any suggestions? Do I have to create a Custom Data Access Class?
Server Error in '/2004_gmg Web Application' Application.
--------------------------------------------------------------------------------

Dynamic SQL generation is not supported against a SelectCommand that does not return any base table information. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.InvalidOperationException: Dynamic SQL generation is not supported against a SelectCommand that does not return any base table information.

Source Error: 


Line 116:			DataSet dsPatient = (DataSet)Session["dsPatient"];
Line 117:
Line 118:			if (this.Save(this.oPatient, dsPatient, this.oPatient.TableName) ==
Line 119:				mmSaveDataResult.RulesPassed)
Line 120:			{
 

Source File: c:\inetpub\wwwroot\2004_gmg web application\patientedit.aspx.cs    Line: 118 

Stack Trace: 


[InvalidOperationException: Dynamic SQL generation is not supported against a SelectCommand that does not return any base table information.]
   OakLeaf.MM.Main.Business.mmBusinessObject.HandleException(Exception e)
   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)
   gmg.WebPatientSystem.PatientEdit.btnSave_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\2004_gmg web application\patientedit.aspx.cs:118
   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()

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573 
Thanx,
Neil
Next
Reply
Map
View

Click here to load this message in the networking platform