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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to copy structure from a cursor to new cursor 1

Status
Not open for further replies.

paispatin

Technical User
Oct 21, 2003
62
A1
I have CURSOR1, I want to copy the CURSOR1 structure to new cursor name CURSOR2.

When I try this one, the new cursor always locked:
Code:
SELECT * FROM cursor1 INTO CURSOR cursor2

SELECT cursor2
zap
It' will return error : Can not update the cursor cursor2, since it is read-only

So, anyone could help me how to copy CURSOR1 structure to CURSOR2 and then I can use CURSOR2 to add or delete data inside CURSOR2.

Thank you in advance.
 


Try :
Code:
SELECT * FROM cursor1 WHERE .F. INTO CURSOR cursor2 READWRITE

No need to zap, since its already empty.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Yes Chris, I get it. Thank you for your help. :)
 
Yes Mike, It's better than using zap.
Thank you very much.
 
For anyone who’s interested, here’s another way:

Select cursor1
Afields( ablep)

Select 0
Create cursor cursor2 from array ablep


Stefan

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top