Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How will I ever get my app ported to SQL Server?
Message
 
 
To
20/08/2008 11:44:40
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01338696
Message ID:
01340395
Views:
25
You need to create your indexes for your cursors after you get them with CursorFill. Consider these cursors the same way as regular cursors or as local views. Once you get them, you need to index them. If you get them again with cursorfill, you need to re-create indexes again.

>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.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform