Solved SQL Server ODBC Error

General discussion forum about all databases other than SqlBase.
manimaran

SQL Server ODBC Error

Post by manimaran » 10 Feb 2010, 17:19

Hi Friends,

I am using CTD 4.1 and SQL Server 2005. When i am working with my application getting the following error.

SQL Error 20055 [Microsoft][ODBC SQL Server Driver]Connection in busy with results for another hstmt.

My application through this error, when it's process multiple resultsets in loop.

Please help me to resolve this issue.

Manimaran

Josi54
Germany
Posts: 14
Joined: 01 Aug 2018, 13:27
Location: Germany

Re: SQL Server ODBC Error

Post by Josi54 » 11 Feb 2010, 17:43

Hi!

Set SqlResultSet = TRUE
Call SqlConnect(hSql)
Call SqlPrepareAndExecute(hSql, 'select x from y')
While SqlFetchNext(hSql, nRet)
Do some SQL-stuff


OR


Call SqlConnect(hSql)
Call SqlSetResultSet(hSql, TRUE)
Call SqlPrepareAndExecute(hSql, 'select x from y')
While SqlFetchNext(hSql, nRet)
Do some SQL-stuff


Hope this helps.

Josi45

rjhilliard

Re: SQL Server ODBC Error

Post by rjhilliard » 04 Aug 2015, 21:35

I resolved this by using Call SqlResultset(hsql, TRUE)

FRBhote
India
Posts: 2201
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

Re: SQL Server ODBC Error

Post by FRBhote » 05 Aug 2015, 06:55

The problem with using the Native driver and setting REsult Set to TRUE is that you ned to commit each cursor individually.

willkf25
Brazil
Posts: 3
Joined: 20 Apr 2021, 21:32
Location: Maringá-PR -Brazil

Re: SQL Server ODBC Error

Post by willkf25 » 02 Mar 2022, 00:14

Code: Select all

SqlSetResultSet(hSql, TRUE)
that's worked fine for me!
I've speend to much time in this issue...

Thx a loot!

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 0 guests