Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Framework evaluation - SPT
Message
From
24/05/2002 15:22:43
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
24/05/2002 14:26:17
General information
Forum:
Visual FoxPro
Category:
CodeMine
Miscellaneous
Thread ID:
00661140
Message ID:
00661228
Views:
36
Hi Gary

I think your extract would be a good addition to the framework feature chart. Do you know if putting it there would be a problem? Is it legal for you to even post the material here?

>Hi Steve:
>
>See the notes from the Codemine .CHM file below :-
>
>Any remote view can be opened as an updateable SQL Passthrough cursor. A non-updateable SQLPT cursor can also be created directly from any valid SQL statement.
>
>To open an SQLPT cursor, set the cType property to "SQLPT". When cType is set to "SQLPT", there are 3 different kinds of SQLPT cursors available, based on the string specified in the cSource property.
>
>Select Statements
>If cSource begins with "SELECT", it is assumed to be an SQL SELECT statement to be sent to the server to create a non-updateable cursor. This type of cursor supports a parameterized WHERE clause, specified either directly in the cSource property, or in the cWhere property. The syntax for the parameterized WHERE clause is the same as any VFP view. Since the SQL statement can be parameterized, these cursors can be defined as children in a relation, just like any other cursor type.
>
>EXEC Statements
>If cSource begins with "EXEC", it is assumed to be an SQL Stored Procedure to execute on the server. This also creates a non-updateable result cursor. SQL Stored Procedures can be used to create the equivalent of a server-based parameterized view. That is, you can pass parameters to the Stored Procedure that will be used to determine the result set. The EXEC command can also include VFP level parameters that are evaluated before the command is sent to the server. VFP level parameters use the same "?" prefix syntax as a regular VFP view definition.
>
>Updateable SQLPT Based on a Remote View Definition
>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.
>
>Note when using Grids: One limitation of all SQLPT views is that when they are requeried, the new result set is stored in a different temporary VFP cursor file. This means if the cursor is displayed in a grid, the grid will be reset when you requery the cursor.
>To preserve the grid layout, you can use the data manager BeforeRequery() event to call the grid's SaveLayout() method, and the AfterRequery() event to call the grid's RestoreLayout() method. Doing this will allow you to preserve the column settings of the grid across the cursor file change.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform