Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLEXEC and Shared Connection Problems
Message
From
11/11/2004 10:08:45
 
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:
00960424
Views:
9
>Hi
>

>The problem is that when I attempt to test the busyness of the connection using the statement handle that the SQLCONNECT returns it always returns false, even thought it's using the same connection handle and is marked as shared.

But, if you set AllowsimultaneousFetch=.T.,
then you want 2 (TWO) or more simultaneous async fetch into the same connection,
but then:
- the connection is busy, and therefore you cannot execute an other command on it. Not.
- the logon has any running command? Yes
- the statement for which you ask the answer is free to run? Yes
- What is occupied: The statement of the view that is being filled up.

Then, SQLGETPROP(lnhandle,"ConnectBusy")
return the connection busy state or the statement busy state ?
Documentation it is not clear on this.

Sure
SQLGETPROP(lnhandle,"ConnectBusy") return .F.
it is correct.

Hovewer, try this ( this a program more correct ):
lnhandle1=SQLCONNECT('Connection1',.T.) && open a statement into a session
USE MyRemoteView CONNSTRING m.lnhandle1 && use the first statement for open the view
lnhandle2=SQLCONNECT(m.lnhandle1)  && alloc anothe statement into the same session
* next line must print .T.,.F.
DEBUGOUT SQLGETPROP(lnhandle1,"ConnectBusy"),SQLGETPROP(lnhandle2"ConnectBusy") && check busy status
Fabio
Previous
Reply
Map
View

Click here to load this message in the networking platform