Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How will I ever get my app ported to SQL Server?
Message
De
20/08/2008 11:44:40
 
 
À
15/08/2008 20:22:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01338696
Message ID:
01340394
Vues:
35
Me again... So I've got my DataEnvironement class created (though the VFP IDE and builder) and I added two CursorAdapters (again through the IDE Builder tool

For now I am just testing from the command window, so I create a DE oject, and open the two CursorAdatpers like this:
Set classlib to f:\work\lmsql\lmdata
lo=NewObject("lmdata")

lo.Jobs.CursorFill()
lo.Customers.CursorFill()
... and WOW, I get two VFP-looking cursors from my SQL Server (which is running on some other test machine I have running on my network).


Now, my big question is "What about my indexes" that I need for my one-to-many navigation?

You see, in the current native VFP architure of my app, I use free tables, and I call a method in the form.load() event to open the tables and set the Relations: (example)
*-- Open child tables ----
select 0
use Customers order custno

select 0
use Materials order jobno
select 0
use TimeRecords order jobno


*-- Open Parent Table -----
select 0
use Jobs order jobno
Set relation to custno into Customers
Set Relation to jobno into Materials additive
Set Relation to jobno into TimeRecords additive
Now I have the pointer in each of the Child tables table moving when I move the Jobs pointer...I rely on this very much in the navigation structure and processing and display of data in my app. I use a VCR control to move around the Jobs table, as well as a lookup textbox to jump straight to a certain Job, but then I need all the Child cursors to be in synch also. In total I may have about 6 to 8 child tables that I need to have in synch with the Jobs pointer.

So how do you get this part working? Surely I do not have to create indexes on each child every time I launch the forms.





>
>I've been slowly moving systems from VFP over to MSSQL I use cursor adapters to mimic as much as possible the original DBF and to reduce the amount of recoding necessary.
>
>I do use upsizing wizard to convert the data originally.
>
>On the C# side just use ToList() on the query and you will then have an index. You already know how the relationships work.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform