Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CursorAdapter SQL Server and Identity column
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01526084
Message ID:
01526120
Vues:
42
>>>Hi,
>>>
>>>I am using CursorAdapter method of updating base table in SQL Server from VFP application. One of the columns is identity column. Typically user has not access to this column so when the base table in SQL is updated, there is no problem. But I have a process that can enter a value into the Identity column (usually 0) of the CursorAdapter. In this case, before I call TABLEUPDATE() I would like to "disable" cursor adapter from trying to set the value in the base table. Otherwise, there is an error. Is there a method/approach of programmatically "instruct" CursorAdapter not to try updating the Identity column?
>>>
>>>TIA.
>>
>>You have to remove this column from UpdatableNameList property.
>
>You are correct. However, I use the same application with the same BIZ object based on Cursor Adapter for either SQL Server or VFP data. For VFP data I need to be able to update the "Identity" column; for SQL Server not. For now I found the solution to this dilemma. But in the future I will probably change my code to exclude this column from the UpdatableNameList if the application is using SQL Server.
>Thank you.

Make VFP column also to be IDENITY (or AUTOINC in VFP):-)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform