Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How abour a delete/requery question?
Message
De
15/09/2003 12:42:48
 
 
À
15/09/2003 10:23:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00828897
Message ID:
00829037
Vues:
22
Ric,

I created your database on SQL server 7 using your script in query analyzer. It errored on COLLATE SQL_Latin1_General_CP1_CI so I removed the collate lines and it created the database using the default collate. The script does not indicate which field is used for primary key. Does the table have a primary index?

Next, I created test.dbc to contain the view definition and ran the code to create the view. I opened the view in the view designer and set all fields updatable with usr_reference field as key and checked "send SQL updates" and where clause includes "Key Fields Only".

Next, I opened the view, set buffering to 3, added some records, edited some records, and deleted some records, issuing tableupdate(1,.t.) and requery between each action. Tableupdate returned .t. and requery() returned 1 for each action. I checked in enterprise manager to be sure that all changes were properly applied and each time they worked exactly as expected.

Only thing that I had to do was removed the collate that you specified when creating the database and specify a key field for updating the view (wasn't sure which field you used). I used VFP 6 SP5, SQL Server 7 and ODBC driver SQLSRV32.DLL version 2000.81.9041.40 date 7/23/2003, created a system DSN to the master database on SQL Server, used this DNS as connection for remote view.

Unfortunately, I was unable to duplicate the problem that you are seeing. If you can provide what COLLATE SQL_Latin1_General_CP1_CI_AS is (it appears to be a constant that I don't have defined) and let me know if you have a primary key on the table or which field you use as key for update in the view, maybe I can retry using the same collate and key fields that you are using.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform