Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data Adapter Wizard fails to generate code for vfp datab
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00842222
Message ID:
00845490
Views:
22
Hi Neil,

Please see my prior post.

>Hi Cathi,
>
>No one in the Mere Mortal Forum, over the last 2 weeks, has offered any samples of code that would help me in saving data on my web page back to my fpw26 free table datastore. Sure, I have been advised to create a custom data access source and to simply follow the instructions in the developer's guide. The guide was not helpful since if you attempt to engage the visual designers, they error out because the fox oledb data provider is not supported. So that leaves me to roll my own stuff. I am left with the task of communicating with free tables via ado.net. No one has answered any of any my questions as to how to do that. And.... the situation becomes even more complicated because I want to stay within the Mere Mortal framework's functionality as much as possible. So the best I can come up with on my own is this. I find that the code below updates the free table successfully.
>
>public DataSet UpdatePatientBycustid(string tccustid)
>{
>
> string strConn ="Provider=VFPOLEDB.1;Data source=c:\\gmgwin\\main;";
> OleDbConnection cn = new OleDbConnection(strConn);
> cn.Open();
> OleDbCommand cmd = cn.CreateCommand();
> cmd.CommandText = "set null off";
> cmd.ExecuteNonQuery();
> // for a test force title to stomper pony
> cmd.CommandText = "UPDATE c:\\gmgwin\\main\\arypat01 SET title = 'stomper pony' where custid='" + tccustid + "'" ;
> cmd.ExecuteNonQuery();
> return this.GetPatientBycustid(tccustid);
>}
>
>I added a button on my web page whose resposibilty is to fire the method that saves the data in all of the textboxs on the page. I have greatly wondered away from the the functionality offered by the mm code suggested in the Jump Start example, namely:
>
>
>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");
> }
>}
>
>
>I would however like to keep as much of the Mere Mortal functionality as I can. For example: All of the functionality fired up by the method btnSave_Click(object sender, System.EventArgs e)
>
>Rick has some wonderful material written on vfp7-.net interop, however I am still in the dark as to how to keep Mere Mortal functionality while communicating with a free table backend. The .net Mere Mortal framework documentation does not seem to expose (describe) the PEMs of classes as was done in the vfp Mere Mortal documentation.
>
>Any thoughts?
>Neil
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Reply
Map
View

Click here to load this message in the networking platform