Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Query, Recno() question
Message
From
24/10/2000 10:13:17
 
 
To
24/10/2000 09:50:02
Carol Dewar
Magram Computer Services Llc
Saugerties, New York, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00433432
Message ID:
00433455
Views:
10
>I came across this code, which goes back to VFP3, and do not understand how it works. If I did I would continue using it. I am planning on using a transaction numbering scheme to id unique records in the children.
>
>The Query:
>SELECT 'Escrow' AS Account,P.Prem_Cnty AS County, P.Fileno,D3.*, ;
>'3' AS DisbFile,Recno() AS Recno ;
>FROM Parent P,Disburs3 D3 ;
>WHERE P.Titleno=D3.Titleno.and. ;
>Between(D3.ToBeDisb,gdBeginDate,gdEndDate) .and. ;
>P.Prem_Cnty=gcCounty ;
>INTO DBF (gcLocPath + "\dbfTemp") ;
>ORDER BY 2,1,3
>
>Parent.dbf is the parent, Disburs3 is a child.
>
>What I do not understand is why Recno() returns the matching record no. in Disburs3? why not from Parent?
>
>I tried Recno("Disburs3") and got the one record no. the cursor was on when DbfTemp was written.
>
>Any clues would be appreiated.
>Carol

RECNO() is unreliable when used in a multi-table SELECT. This is documented in the help file. This occurs because VFP does a USE AGAIN on the tables, which creates a different alias.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Reply
Map
View

Click here to load this message in the networking platform