General information
Category:
Coding, syntax & commands
>>>Whoops! Um...when I try to INSERT INTO mycursor FROM ARRAY myarray, it tells me that the cursor is readonly. I suppose that wouldn't happen if I CREATE CURSOR from the beginning, but what is the most efficient way to make the cursor not be readonly?
>>
>>There's a quite original tip for that on the Tip's section of VFUG.
>>I don't exactly remember now, you'll have to check it there...
>>
>>Renato
>
>You can do a:
>
>use dbf('oldcursor') again in 0 alias newcursor
>
>this will give an editable new cursor...
Tip #8 in VFUG says much the same thing as Mr. T. A. Bureaucrat says:
SELECT 0
lnSelArea=SELECT()
USE DBF("Cursor_Name") in (lnSelArea) again alias New_Alias
select Cursor_Name
USE
select NewAlias
but since I wanted my old cursor back, I went:
SELECT 0
lnSelArea=SELECT()
USE DBF("SkaRange") in (lnSelArea) again alias NewAlias
select SkaRange
USE
SELECT 0
lnSelArea=SELECT()
USE DBF("NewAlias") in (lnSelArea) again alias SkaRange
select NewAlias
USE
SELECT SkaRange
The .RowSource of my list box had to be set to "" before I did this, and then set back to SkaRange afterwards, so I wouldn't get an error saying "cannot access the selected table (1152)."
Thanks, guys.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only