Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLEXEC and Shared Connection Problems
Message
From
15/11/2004 14:39:38
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP SP1
Database:
MS SQL Server
Miscellaneous
Thread ID:
00960314
Message ID:
00961489
Views:
8
Hi Bernard,

This is a bug, to workaround execute RECCOUNT() or GO BOTTOM before executing INDEX ON command.

If you are going to build an index right after opening a View, it is better to leave AllowSimultaneousFetch = .F. because you don't really need simultaneous fetch capability and, usually, the fetch with AllowSimultaneousFetch = .F is much faster.

Thanks,
Aleksey.


>Hi Aleksey,
>
>Thanks again for the reply...I've got my code working now, many thanks...
>
>However I have noticed a change of behavour with my code depending on which way I set the AllowSimultaneousFetch proeprty.
>
>Previously, before the introduction of the AllowSimultaneousFetch property my code would, in effect have looked like this ;
>
>
>DELETE DATABASE REMOTE
>CREATE DATABASE REMOTE
>CREATE CONNECTION "MyDataBaseConn" CONNSTRING 'driver=SQL SERVER;server=(local);uid=USER1;pwd=PASSWORD1;database=MyDataBase'
>
>CREATE SQL VIEW Test REMOTE CONNECTION MyDataBaseConn SHARE AS SELECT * FROM SOMELARGETABLE
>DBSETPROP('Test','view', 'AllowSimultaneousFetch',.F.)
>DBSETPROP('Test','view', 'fetchasneeded', .F.)
>DBSETPROP('Test','view', 'fetchsize', 100)
>DBSETPROP('Test', 'View','ShareConnection', .T.)
>
>USE test
>INDEX ON SomeField TAG SomeTagName
>
>
>When the code reaches the 'index on' command it would go into a wait state until all the records had been returned and the index command would work ok.
>
>If I change the AllowSimultaneousFetch to True, and re-run the code the code doesn't go into a wait state, and reports an error when it reaches the Index command.
>
>The error is 'Connectivity error : Unable to retrieve specfic error information. Driver is probably out of resources'
>
>Do we now have to test the connection before attempting to index ?
>
>Could you tell me which other commands, such as indexing, will be affected?
>
>Many Thanks, Bernard
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform