General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only