Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remote Views to Cursor Adapters
Message
 
 
To
10/06/2005 08:15:15
Irv Adams
MSC Managed Care, Inc.
Florida, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01022099
Message ID:
01022165
Views:
11
This message has been marked as the solution to the initial question of the thread.
>To All:
>
>We would like to port our SQL Parameterized Remote Views over to cursoradapters. Is there any existing code or classes which could assist us?
>
>TIA,

YOu can run from the Command Window with your DBC open:

DO HOME() + [tools\gendbc\gendbc]

This will create a PRG file of all the code needed to recreate your database including the SQL for creating your RVs. You can use that to populate the SelectCmd properties of your CAs. Not ideal, but an option.

A better option is to use ADBOBJECTS(laViews, 'VIEW') to get an array of views in the DBC. Loop through those views and use DBGETPROP() to get the SQL used to create each view. Use that SQL to set the SelectCmd property of the appropriate CA.

Now how to create your CAs? For your views that are based on a single table, you can use my CABuilder9 to create a classlib of CAs for every table in your remote database. You can use the techniques in my builder to "modify class caname nowait" to populate the appropriate properties in each CA class. YOu can get this free builder including source code that has significant use comments in the builder PRG file by clicking the FoxPro Tools link at:

http://www.mctweedle.com
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform