Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: Bhoopathy kalaivani
  Where is Bhoopathy kalaivani?
 Erode
 India
 Bhoopathy kalaivani
 Tags
Subject: RE: Codeing Doubt
Thread ID: 268591 Message ID: 268623 # Views: 66 # Ratings: 1
Version: Visual FoxPro 9 SP2 Category: Projects and Design
Date: Tuesday, July 13, 2010 4:01:06 PM         
   


> Dear Experts,
>
> I am update three tables at a time
>
> Some time File is in Use error Exit
>
> Code is
>
> update table2 set propono=newprono where propono=thisform.text1.value
> update table3 set propono=newprono where propono=thisform.text1.value
> update table6 set propono=newprono where propono=thisform.text1.value
>
> How is update correctly all table and conform all table update.
>


I agree with Russell's recommendation not to use object.properties inside SQL statements, especially not in a Where clause.

As for the "File is in Use" error: If at least one of those tables in your SQL statements was not Used() before, your SQL Update statements would leave an alias in the next unused xBase work area.
Since Set Exclusive is "On" by default and being scoped to the current data session, that alias would be opened exclusively by accident, so that perhaps an explicit
Set Exclusive Off
might help (in each data session, for instance in yourFormClass.Load())


hth
-Stefan

ENTIRE THREAD

Codeing Doubt Posted by Bhoopathy kalaivani @ 7/13/2010 1:35:41 PM
RE: Codeing Doubt Posted by Russell Hill @ 7/13/2010 2:24:21 PM
RE: Codeing Doubt Posted by Bhoopathy kalaivani @ 7/16/2010 2:12:06 PM
RE: Codeing Doubt Posted by Stefan Wuebbe @ 7/17/2010 9:37:23 AM
RE: Codeing Doubt Posted by Stefan Wuebbe @ 7/13/2010 4:01:06 PM