Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remote Views to Cursor Adapters
Message
 
 
À
10/06/2005 08:15:15
Irv Adams
MSC Managed Care, Inc.
Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01022099
Message ID:
01022165
Vues:
12
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform