RE: :ODBC to SQL Server - can 2 queries be open at same time on 1 connection
From: Jeff Urlwin (jurlwin_at_esoftmatic.com)
Date: 04/07/04
- Next message: Robert: "Passing two parameters in insert statement"
- Previous message: Dean Arnold: "Re: DBD::chart linegraph questions"
- In reply to: Graham Davison: "DBD::ODBC to SQL Server - can 2 queries be open at same time on 1 connection"
- Next in thread: Tim Bunce: "Re: :ODBC to SQL Server - can 2 queries be open at same time on 1 connection"
- Reply: Tim Bunce: "Re: :ODBC to SQL Server - can 2 queries be open at same time on 1 connection"
- Reply: Graham Davison: "Re: :ODBC to SQL Server - can 2 queries be open at same time on 1 connection"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: "'Graham Davison'" <graham@metrex.net>, <dbi-users@perl.org> Date: Wed, 7 Apr 2004 13:55:29 -0400
>
>
> Hi.
>
> Is it possible to have two queries open at the same time on one
> connection to a DB? I'm using DBD::ODBC to access an SQL
> Server DB, if
> that makes any difference.
>
> I'm trying to access some info from one set, then, based on the the
> info from each result to that query, I need to get some info from
> another query. This works for about 63 queries, then I get an error
> message that says: "DBD::ODBC::st fetchrow_hashref failed:
> [OpenLink][ODBC][Driver]Function sequence error (SQL-HY010)(DBD:
> st_fetch/SQLFetch err=-1)"
>
> If I remove the accesses to the data from the second query, I
> get this
> error message: "DBD::ODBC::st fetchrow_hashref failed:
> [OpenLink][ODBC][Driver]Connection is busy with results for another
> hstmt. (SQL-IM921)(DBD: st_fetch/SQLFetch err=-1)"
First, I encourage you to examine the DBD::ODBC POD documentation, and
DBD::ODBC::Changes POD docs to notice that DBD::ODBC 1.08 and above allow
setting of odbc_cursortype. t/20SqlServer.t has a test which shows how you
can use this odbc_cursortype.
If that doesn't work for you, then I would google through this group and a
few (maybe more) months ago there was a LONG thread about it with options on
how to handle this (including some safe and not so safe options)
Regards,
Jeff
- Next message: Robert: "Passing two parameters in insert statement"
- Previous message: Dean Arnold: "Re: DBD::chart linegraph questions"
- In reply to: Graham Davison: "DBD::ODBC to SQL Server - can 2 queries be open at same time on 1 connection"
- Next in thread: Tim Bunce: "Re: :ODBC to SQL Server - can 2 queries be open at same time on 1 connection"
- Reply: Tim Bunce: "Re: :ODBC to SQL Server - can 2 queries be open at same time on 1 connection"
- Reply: Graham Davison: "Re: :ODBC to SQL Server - can 2 queries be open at same time on 1 connection"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|