Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL to VFP cursors, as opposed to Remote Views
Message
From
23/06/2007 13:39:32
 
 
To
23/06/2007 11:19:54
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
01235175
Message ID:
01235195
Views:
17
>>Hey FoxFolx!
>>
>>I've got another interesting one...
>>
>>We had an app that we upsized a number of years ago from VFP to SQL. Since we were new to SQL, we took the easy way and used a DBC with loads of remote views (I can still hear Jim Duffy yelling at me about it).
>>
>>One of the things we would have to do if we wanted to run a SELECT against a view where we had already gotten data (in other words, wanted to SELECT that data out to a second cursor) was to use DBSETPROP() to turn off "SendUpdates" temporarily so that the View didn't run the query again during the Select.
>>
>>Now... we've moved to SPT and moved all of the views up to SQL as Stored Procedures. This isn't a problem because we then simply run then via a SQLEXEC() that sends up the parameter list and the name of the cursor to be created.
>>
>>No problem so far. We can even run a SELECT against it without any manipulation. But... if I have an empty cursor and I do an APPEND BLANK and add data to it, when I then try to run a SELECT out of it to a second cursor, I get zero records. I even get this is I simply run a SELECT * FROM original_cursor INTO CURSOR new_cursor.
>>
>>Weird. I wondered if it acted like a Remote View, so I even tried running a CURSORSETPROP("SendUpdates", .f., cursorname), and that didn't work.
>>
>>Has anyone seen this before? Am I missing something so blindly stupid as to prove embarrassing when it's brought to my attention? I'm willing to learn.
>>
>>TIA!
>
>I don't quite understand. You can simply select from an SPT cursor. Maybe you buffered it and trying to do the select w/o setting ( with (buffering=.t.) - VFP9).
>Cetin

I can SELECT from one, except if I have an empty set, do an APPEND BLANK and then try to Select. I'll try the new setting to see if this does it.
-- John Kiernan
"Maybe Amelia Earhart was just stealing the plane".
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform