Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Here's a fun one.

Status
Not open for further replies.

GrayCat

Programmer
Jul 12, 2002
13
US
I built a temp cursor with a select statement.
Then immediately copy to a text file on the next line.
My cursor temp.field looses it's value. Has the value after the select, but not after the copy.

I simply moved my copy to a different place, but what is this about?



 
If what you are saying it's something like this:
Code:
SELECT *,0 as dummy from test INTO CURSOR mycursor
? mycursor.field1 && prints value from first record
COPY TO dummy.txt TYPE sdf
? mycursor.field1 && prints nothing
Then this is right. The Copy moves the record pointer in the cursor to EOF, and at that point none of the fields in the cursor have a value. Add GO TOP (or GO 1, or LOCATE) after the copy, and you'll get the first record's data.

Rick


 
Thank you so much. Thank makes perfect sense.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top