Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data Refresh Header-Good, Items-Bad
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00984056
Message ID:
00984163
Views:
36
It's necessary to call this from a SQL-select because the computer inserting the records is not necessarily the computer running the SQL-Select statement. This application typically involves multiple computers.

Here's the thing that baffles me:
One computer inserting records will issue (simplified version)
insert into sohead (sonum) values (lnSONum)
insert into soitems (itemnum) values (lnItemNum)
flush

Then another computer will run the SQL-Select query and it will immediately see the new records in the sohead table but won't see the new records in the soitems table.

Another thing occurred to me that might be a little different. The UDF that the SQL-Select statement calls uses the soitems table again like such

lparameters lnSONum
local lnSelect,lcItemList
lnSelect=select()
lcItemList=''
use soitems in 0 shared alias soitems_again
sele soitems_again
locate for sonum=lnSONum
do while found()
lcItemList=lcItemList+iif(!empty(lcItemList),',','')+alltrim(str(soitems.itemnum))
continue
enddo
use in soitems_again
select (lnSelect)
return lcItemList

Any idea if using the table again can cause Foxpro to only look in the cache rather than looking on the drive?
Brandon Harker
Sebae Data Solutions
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform