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:
00845489
Views:
16
Hi Neil,

Sorry it took so long to reply, I was at PDC last week. I can completely understand your feeling about using VFP data. Almost all examples given are used against SQL Server. One article that gives examples about working with VFP data is the following MSDN article that I wrote a long time ago. However it is still applicable in your case to give examples of writing an UPDATE statement. The DELETE statement would be very similar. See if this helps and if this is not what you need then we can discuss consulting after that.

http://msdn.microsoft.com/library/?url=/library/en-us/dnfoxgen7/html/usingaspnetwithvfp7.asp

>Thank you Cathi for giving me new focus regarding my recent support issue. I did not know that the visual designers did not support the vfp oledb data provider. But I kind of got lost in that and never really completed my discussions with you regarding using FoxPro free tables as a datastore within the .net framework. I am using asp.net to breathe new life into and maintain a very old database application. The app was written in fpw26 and is still very much alive. I have read much about .net for the vfp developer (thank you very much)and have come up with one thing. Fox is the ugly step sister who has been left to clean the house while all the other girls go off to the ball. Sure, everyone has offered code samples for *reading* old fpw26 free tables. Kevin actually states that no chapter, which deals with data, would be complete without a discussion of vfp as a datastore. But no one, not even Kevin, has crossed over into giving examples as to sending an UPDATE or DELETE command
>to the fox free table via ado.net. All of the authors have warnings about fox's lack of adequate schema for the commandbuilder to communicate with the backend. Everyone boldly suggest that I should roll my own code via a custom data access class. I am toast. I don't have a clue and there is not a single source out there that can provide me with 1 sample of how to get a free fpw26 table to participate with the .net framework. That is reading form and writing to.
>
>Thank you for continuing to support this issue. If you feel that I have crossed over to a pay- for- support issue, please contact me at 516-599-5283.
>
>Dr.G. (Neil)
>----- Original Message
>
>
>
>>Neil,
>>
>>I wouldn't recommend doing this. There are differences in syntax and the classes that are involved. I would recommend doing them by hand.
>>
>>>Hi Cathi,
>>>
>>>Thank you for responding. I have used the MM Jump Start to show me how to create a custom data access class. The Wizard generates all of the necessary code if I start with a connection to SQL Northwind. If I connect to vfp Northwind the Wizard fails to generate UPDATE and DELETE statements. Can I use the UPDATE and DELETE statements that have been generated for SQL Northwind as an example as to what is needed for vfp Northwind. Does vfp respond to the Wizard's generated SQL statements the same way as SQL does? Do the statements make sense to vfp?
>>>
>>>Thank you again,
>>>Neil
>>>
>>>
>>>>Neil,
>>>>
>>>>These are known issue with the VFP team. The real problem rests with the wizard itself. Hopefully it will be fixed in the next release of Visual Studio.
>>>>
>>>>>I was thinking about how I could get the schema of a fpw26 free table that the Data Adapter Configuration Wizard needs. Without the schema, we are limited in what the Data Adapter Configuration Wizard can produce in terms of UPDATE and DELETE statements.
>>>>>
>>>>>This is what I came up with:
>>>>>
>>>>>1)Create a dummy dbc
>>>>>2)Make a copy of the free table, along with fpt and cdx files, that I need the schema to.
>>>>>3)Add the the copy of the free table to Dummy.dbc
>>>>>4)Have the Wizard work off of Dummy.dbc and then modify the generated code afterwards so that the code will work with the actual free table.
>>>>>
>>>>>So, this is what happened:
>>>>>I made a dummy dbc and added the copy of the free table to Dummy.dbc. I marked one of my index tags as primary. I created a class called DummyDataAccess and dragged over OleDbDataAdapter from the toolkit. The Wizard fired up and I selected Dummy.dbc as the data connection. The query buider had my table in it's list so I new I was making progress. The problem is that I still cannot get the wizard to generate Update and Delete statements. The error noted by the wizard is extremely vague, namely:
>>>>>"There were errors configuring the data adapater". So I cannot even get the Wizard to work off of a vfp database. Has anyone got the wizard to work off of a vfp database? I even attempted top use the wizard with the vfp version of Northwind, thinking that my database was screwy, and got the same error. So, does the Wizard work with vfp data yet or so we still have to wait for the next update?
>>>>>
>>>>>Any thoughts? Any body?
>>>>>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