Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visual FoxPro Entity Framework

Status
Not open for further replies.

goodhowareyou

Programmer
Feb 14, 2017
2
US
Hello. I have in place, a form within MVC .NET framework, that will save my values to FoxPro using the Entity Framework. But it will only save once. After saving, the values are not editable. The data is in the table, but I cannot change it from the view of my MVC.

I have been looking for weeks around the FoxPro forums trying to solve this issue. I have come across - attached and detached states - but have not been able to successfully update my form.

Is there anything that would be preventing me from updating otherwise? Like I said, it will save the initial time, but if you come back in and try to save again, it will only load the values and remain in like a read only state.

Thanks for your help in advance.
 
What VFP driver/provider did you use? To my knowledge there is nothing like a data provider for DBFs via Entity Frameworks necessary Interfaces.

Bye, Olaf.
 
Asking Google I find this. Is that, what you're using?


It's new to me and I don't know the state of it, but have you followed advices about primary or candidate keys? Are your DBFs having such indexes/keys?

My initial find was and at that time Tom Brothers mentioned this is for queries, so at that time it may only have been done to read data, not save/update. The mentioning of primary/candidate keys makes updates a possible advance of the EF provider, but ask him, Tom Brothers - if you use that. This is not coming from MS nor a senior VFP community member - if I name it that way for now. No discrediting, but both this and Tom are news to me.

The only official data provider for .NET I faintly remember was released with Sedna and had nothing to do with EF: This was done for VS2005, was reported to work in VS2008, too and then deprecated. At that time it was a base architecture, but afaik nowadays EF providers have a different basis. You may easily know more about that EF architecture than me, though I used EF already, too. only for MSSQL, though.

You might go through the hoop of adding DBF data to MSSQL via linked server and then use the usual EF provider for MSSQL.

Bye, Olaf.
 
Thank you for the fast reply. I have looked over your response and talked it over with my team. I guess I was confused about where the data was saving within this particular project. We are using the Entity Framework to save into our SQL database. FoxPro is being handled inside of other projects. I will find a SQL form and try to ask my question there.

Thanks again.
 
EF is more related to .NET than to MSSQL, perhaps you look for a C# or VB.NET forum.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top