Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP OleDb Driver and Marked Records
Message
De
16/12/2005 10:52:27
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Titre:
VFP OleDb Driver and Marked Records
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01078685
Message ID:
01078685
Vues:
44
In .NET I am using the OleDB driver to access a Visual FoxPro database. I have everything working fine, except when it comes to marked records.

Let's assume we have a foxpro table that has a code field (Attendance Code) that is unique and is the primary key for the table. In an operation I can issue an SQL delete command, which marks the record correctly. I then try to issue an SQL insert to add a new record with the same key value as the deleted one and a Trigger Error is generated, which only makes sense.

I would like to be able to:
1) Do a search of marked records before insertion to avoid the trigger error
2) Recall a marked record and issue an update rather than an insert

I do realize that if I used good database practices, such as having a primary key that is auto generated and not meaningful, I could avoid this scenario. However, I am trying to develop a web interface for an existing VFP system that would require an extensive rewrite to correct the problem with primary keys.

My best guess at a solution so far is to use a stored procedure in the VFP DBC to handle checking for and recalling the record, but I'm looking for something easier.

Thanks for any help that can be provided.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform