Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ronan Masangcay
  Where is Ronan Masangcay?
 Ronan Masangcay
 To: Bernard Bout
  Where is Bernard Bout?
 Bernard Bout
Subject: RE: SQLEXEC("UPDATE") destination table = SQL Server (dbo) from VFP cursor -- MULTIPLE RECORDS IN ON
Thread ID: 102737 Message ID: 113327 # Views: 2 # Ratings: 0
Version: Visual FoxPro 6 Category: Databases, Tables and SQL Server
Date: Friday, November 17, 2006 5:03:56 AM         

> > ******************************************************************
> >
> > Dear Bernard,
> >
> > CA is really good. I create CAs and pratice off VFP tables, upsize, then update CA on the forms' DE, then I'm done. Thank you for the direction :)
> >
> > however, i need help in understanding why CA is not able to convert or execute the REPLACE ALL command. This goes the same using UPDATE SET WHERE command (not SQLPT since i am using CA).
> >
> > The difference between REPLACE ALL and UPDATE is that REPL ALL does not update anything and UPDATE SET WHERE updates only the last record.
> >
> > Thank you again Bernard!
> >
> > Regards,
> > Ronan
> >
> > Something that's worth doing is worth doing right....
> Hi Ronan
> Without knowing the buffering status of your tables, it is difficult to say.
> Anyway from experience, I never use REPLACE ALL in a multi user environment. I did once long ago and used to get huge locking issues. I advise against using this.
> What backend are you using?
> If using a VFP backend why are you using CA's when you can access the data directly?

> The actual difference between REPLACE ALL and UPDATE SET WHERE is that REPLACE ALL only works in VFP with VFP tables and will replace all the records for the selected table - unless the CURRENTLY SELECTED TABLE is at EOF(). Then no replace will take place. Documented in Help. Easy to fix.
> Just select the table before doing a replace.
> UPDATE SET WHERE on the other hand is a filtered update and will only affect those records that meet the where clause, not all the records. Maybe only 1 record meets the criterion.
> I need more info.

Hi Ronan

Thank you for your time.
1. Buffering = 5 (also tried 3)

2. On this post, i was using CA to update VFP tables for testing and plan to upsize after everything is working

3. Was testing ADD and EDIT functions. APPE BLANK and REPLACE command works fine if i plan to update one specific record at a time. But when I tried REPLACE ALL FOR, it updated the CA cursor (three recordswere updated) but not the VFP table where it (CA cursor) is connected to. UPDATE SET WHERE also updated three records on the CA cursor but only one record in the VFP table.

Thank you Bernard!



SQLEXEC("UPDATE") destination table = SQL Server (dbo) from VFP cursor -- MULTIPLE RECORDS IN ONE GO Posted by Ronan Masangcay @ 7/28/2006 4:58:21 AM
RE: SQLEXEC("UPDATE") destination table = SQL Server (dbo) from VFP cursor -- MULTIPLE RECORDS IN ON Posted by Bernard Bout @ 7/28/2006 5:44:26 AM