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 11:19:54
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
23/06/2007 10:43:32
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
01235175
Message ID:
01235179
Views:
22
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform