Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using LSQLPT Cursors
Message
De
15/02/2006 19:14:05
 
 
À
15/02/2006 18:40:52
Information générale
Forum:
Visual FoxPro
Catégorie:
CodeMine
Divers
Thread ID:
01096583
Message ID:
01096624
Vues:
16
I'm definitely missing something then. In the Codemine documentation under the section "Using SQL Passthrough Cursors", and the subsection: "Updateable SQLPT Based on a Remote View Definition" it states:
If cSource does not begin with SELECT or EXEC, then it is assumed to be a
view name. The database containing the view definition should be specified 
in the cDatabase property. In this case, an updateable SQL passthrough 
cursor is created, based on the properties of the specified view. This 
cursor can be treated in most respects just like a regular remote view, 
however, you can change the WHERE clause at runtime simply by setting the 
cWhere property. The WHERE clause also supports parameters, starting with the
 "?" prefix. This is one of the most powerful variations of the SQLPT cursor,
 because it give you an updateable remote view with a WHERE clause that can 
be easily changed dynamically at runtime. 
I had assumed that the LSQLPT was just a refinement on this, and that the LSQLPT based on a local view would be updateable.
But this isn't true? Is there any way to implement a dynamic where clause against a local view using the Codemine classes?

Mike


>>Thanks Gary!
>
>No problem.
>
>>Do you make frequent use of this type of cursor.
>
>I used it quite a bit when I was using Codemine against local data. I haven't used Codemine for any recent development - my last significant Codemine work has been against SQL server for the past few years.
>
>>It seems like the most flexible both from querying and upsizing?
>
>I found some nice ways to use this cursor. I liked it mostly because it was just like having an ad-hoc SQL statement but, I could view it as a cursor object and, I could link it in automated requerying using Codemine's RI in the CDE.
>
>One thing to note though; if you use LSQLPT cursor, when they are requeried, the existing underlying native Fox cursor is closed and a new one re-opened, possibly in another work area. Remember, if you base a grid on an LSQLPT cursor, when you requery the cursor, the grid's recordsource is snatched away so, you will have to code against this or have blank grids staring back at you when you requery. Also, LSQLPT cursors are read-only. So, if you can live with these restrictions, great. But, they are no substitute for views, local, remote or otherwise. With a local view, you can requery and your cursor doesn't change so, OK with grids - also, views can update their datasources if you want them to.
>
>HTH
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform