Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Indexes on Remote Views
Message
From
03/04/2007 09:11:50
 
 
To
03/04/2007 00:25:59
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
Database:
MS SQL Server
Miscellaneous
Thread ID:
01211442
Message ID:
01211618
Views:
17
>>>>Hi all,
>>>>
>>>>I am investing what it would take to convert database from local to SQL server. I am looking upsize the tables to SQL and access then via remote views. I realize there far better ways to achieve this other te remote views, but it is a question of time to delievery at stake.
>>>>
>>>>While, the question I am asking; can index be created against the remote views so I do not have to change all SET ORDER TO stateements?
>>>>
>>>>Greg
>>>
>>>Yes, you can index remote view, i.e. cursor behind it. In regard to using, it depends on existing application design. I found that in most cases it's more natural to call server stored procedures (through SQLExec), and get data from the server to local cursor by the same way, i.e. you may 'run' the same Select statements that you use now.
>>
>>I see.
>>
>>This is going to take a consistable amount reviewing their existing code. I am sure my boss is not going to like what I will find and report to him.
>
>It will have to do for the quick and dirty. The main point of going to C/S is that you have to change your mindset, from working with tables to working with recordsets. Since now everything is pulled down the wire, it's a trick to pull down only what you need. If it's a lookup table, pull down the keys and searchable fields, then pull the complete selected record. If it's a transactional table, pull complete records for the current document only. If it's for reporting, don't touch anything until you have the time :).
>
>You may need to create two views for some tables - the long/narrow and short/wide. You may also use views for most of the stuff in the input forms - and use SPT for the tricky parts. Depending on the size of the app, it may take some time to optimize it all.
>
>Going just with views, you can do it quick. If you have the time to do parametrized views for most important cases, go for it. Do the rest when you can.

This is all good advice. I have done similar conversion before. But usually there is better planning and time to do it right. There is a motto once told me; "We can do it right, or we can do it now, but we can not do it right-now."
Greg Reichert
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform