Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Updateable cursor
Message
From
11/09/2000 15:10:13
 
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00414875
Message ID:
00415060
Views:
17
>Trey,
>
>Try this one:
>
>SELECT * FROM SourceTable INTO CURSOR WhatEver
>cWhatEver = DBF()
>SELECT 0
>USE &cWhatEver
>
>The cursor is now a regular table.
>
> Andy Crawshaw

You need the AGAIN clause; the following works better for me:

SELECT * FROM whatever INTO CURSOR (SYS(2015))
USE (DBF()) AGAIN IN 0 ALIAS the alias I want to use
USE


The net result is to get the alias I want to use open writable; the SYS(2015) assigns a random name that I need never concern myself with.

This is a writable cursor, not an updatable cursor, in my terminology at least; you can append/delete/alter values in the cursor, but any changes made will not propagate back to the original data tables. Updatable to me implies that the changes will bereflected in the original data tables if the changes are committed, which would require the use of updatable views rather than cursors, which are disjoint from the original sources once they're created.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform