Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remote Views vs. SQL-Pass through
Message
From
31/03/2000 16:52:14
 
 
To
31/03/2000 16:22:46
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00353636
Message ID:
00353654
Views:
16
>We have just installed our first SQL Server and plan to migrate current VFP applications.
>Can someone provide me with a resource or suggestions on when to use remote views and when to use SQL Passthrough
>
>
>Thanks
>Gary in Cloudy Dallas

I am sure you will find someone to disagree with me on this but my view, and many collegues I have talked to, is to never use Remote Views. I have run into too many problems with remote views, and they are often more work then SQL-Pass. I heard of one case where a remote view was losing records, and corrupting indexes (when updating VFP tables).

Another thing to be careful of if you are using SQL Server is using unicode data types (NCHAR, NVARCHAR, NTEXT). VFP does not recognize these properly. If you have a field define with NVARCHAR and you do a tableupdate on it, you get a CHR(0) at the end of the value and the spaces are not removed, eg. If you have a field defined COMPANY NVARCHAR(50), and you store "Microsoft, Inc." in that field, the length will be still be 50 characters and the last character will be CHR(0). Therefore be careful of TABLEUPDATE(). Also, if you bring a NTEXT field down it converts it to C(255) instead of a memo. The only way I have been able to get all the data from a NTEXT field is to use CAST(value AS text), which, by the way, nullifies the purpose of NTEXT. But this is the only solution we have been able to come up with (if anybody else has found a better way please let me know).

Our shop always uses SQL-Pass and we have written a routine to dynamically create the SQL INSERT/UPDATE/DELETE statements instead of using TABLEUPDATE() (Note: Our routine is often faster then the TABLEUPDATE). Notice that this method also means we do not have to make our cursors updatable.

Hope this helps,
GeneS
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform