Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Maurizio Zazzi
  Where is Maurizio Zazzi?
 Maurizio Zazzi
Subject: Updating Access table via remote view with a scan
Thread ID: 15873 Message ID: 15873 # Views: 2 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Wednesday, October 02, 2002 6:30:15 PM         

I have to update (fill a blank field in all rows) an Access 2000 table with values stored in a dbf table. I have successfully made a connection to tha Access table and created a remote view to that table. I want to replace the blank field in the Access table with the values stored in the VFP table with a small program which is a simple scan... replace... endscan like this:

open mydatabase
use mydbftable order field1 in 0
use myviewtoaccess in 0
select myviewtoaccess 
select mydbftable
seek myviewtoaccess.field1
replace myviewtoaccess.field2 with mydbftable.field2 in myviewtoaccess 
select myviewtoaccess 

The code runs but only the first row in the Access table is updated. Then the program stops at endscan with the message 'Connection myconnection is busy'. Before thsi final message I receive this couple of warnings:

Warning: the query timeout cannot be set
Warning: the connection async/sync mode cannot be set

The update criteria in myviewtoaccess are as follows:

Send SQL updates: selected
SQL UPDATE: selected

The connection settings are as follows (all default except for warnings):

Asynchronous execution: not selected
Display warnings: selected
Batch processing: selected
Automatic transactions: selected
Packet size: 4096
Connection: 15
Idle: 0
Query: 0
Wait time: 100

What am I missing?


Maurizio Zazzi


Updating Access table via remote view with a scan Posted by Maurizio Zazzi @ 10/2/2002 6:30:15 PM
Just to add... Posted by Maurizio Zazzi @ 10/3/2002 3:29:12 PM
RE: Updating Access table via remote view with ... Posted by Yuri Rubinov @ 10/3/2002 6:54:41 PM