Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using SQL Server without using *any* VFP table
Message
 
 
À
09/02/2005 09:27:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00985130
Message ID:
00985145
Vues:
32
Do you have MSDE or SQL Server [Defvelopers Edition] installed on your computer? If you have one of the later versions installed, it comes with the Northwind sample database. If you do, I recommend that you start with my Cursor Adapter builder and run it against your SQL Server database. This will create a class library with a CA for each table in the database. Then all you have to do is set a property or 2, drop the appropriate CAs into the DE of your forms, and your basically down to drag-and-drop fields from the CA onto your form just like any other cursor.

I have a CABuilder for VFP 8 and one for VFP 9. Get the appropriate one by clicking the FoxPro Tools link at http://www.mctweedle.com. After you unzip the downloaded file, read through the extensive comments near the top of the CABuidler or CABuilder9 PRG file.

It is much easier than you think. I use a combination of SPT and CAs. I use SPT to get static (read-only) lookup data to populate combos. I use CAs for updatable data.

>Hi,
>
>This may sound somehow very naive, but it's a real problem I'm facing.
>
>I must develop an app using SQL Server as the backend, and can't use any VFP tables (.dbfs, .dbcs etc).
>
>The question is: what folks developing with VFP or even other tools (like VB) use to access SQL Server, retrive data, populate a combobox, a listbox, show data in a grid etc, for example?
>
>VFP works easily with that, because its controls can be bound to VFP tables and cursors. But how can I use those controls when data comes from SQL Server? Sometimes I may use cursors, but other times the source of data has thousands (or milions) of records and may not be appropriate to select them into a cursor and show in a control.
>
>So far I've being using SQL passthru for my apps when needed to access SQL Server, Oracle etc, but always brought selected data into VFP cursors and used them.
>
>My problem is that I don't know how to build such an application, and even know how to start! I have the "Client/Server Applications with Visual FoxPro and SQL Server" in my hands, but didn't find the answers to my questions. Of course it's my fault and I couldn't absorb correctly the information contained therein.
>
>So, what's the way to go? CursorAdapter, ADO, SQL passthru...? Them how?
>
>This type of application (SQL Server with no VFP tables) is seeming to be my future, as clients are asking me (forcing me...) more and more frequently to do so.
>
>Any comments about this subject will be highly appreciated.
>
>Thanks,
>
>Fernando
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform