Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connection is used by another hstmt.
Message
From
08/11/2004 14:13:33
 
 
To
08/11/2004 03:04:27
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00957561
Message ID:
00959297
Views:
29
>>>Hi Folks!
>>>
>>>Today I got another boring Problem.
>>>Im my APP, I use Views mixed with SQL Pass through. The Views and the SQL pass through Connections all shared. Now sometimes I got an ODBC Error:
>>>
>>>Original in German:
>>>Datenbankfehler 0: [Microsoft][ODBC SQL Server Driver]Die Verbindung ist mit Ergebnissen von einem anderen hstmt belegt
>>>
>>>I Try to translate:
>>>Databaseerror 0: [Microsoft][ODBC SQL Server Driver] Connection is used by another hstmt.
>>>
>>>What is this?
>>
>>Hi Jorg,
>>
>>This error might indicate that you are trying to execute some command through a connection handle but VFP hasn't fetched all data for the previous execution. This usually happens when you open a view with FetchSize>0 and then try to execute something through the same connection handle.
>>I assume you are using VFP7 or earlier version. To avoid this error, use FetchSize=-1 for the view or execute GO BOTTOM IN ViewWorkArea before executing the next command. In VFP8, you can share the same ODBC connection without sharing the same connection handle.
>>
>
>Well, we used VFP8. And every view we are using has :
>
>dbsetprop(tcView, "VIEW","MaxRecords" , -1)
>dbsetprop(tcView, "VIEW","FetchAsNeeded", .f.)
>dbsetprop(tcView, "VIEW","FetchSize", -1)
>
>
>I'm totaly confused about these troubles.

Hi Jorg,

The scenario with view was just an example. You didn't provide any details about your specific scenario, so I am just trying to guess here. Are you using asynchronous SPT execution? Are you using BatchMode=.F. for an SPT execution? If yes then check if execution is complete and all results are fetched before you try to execute another command through the same connection.

Thanks,
Aleksey.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform