DBD::ODBC to SQL Server - can 2 queries be open at same time on 1 connection

From: Graham Davison (graham_at_metrex.net)
Date: 04/07/04


To: dbi-users@perl.org
Date: Wed, 7 Apr 2004 11:27:54 -0500

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)"

Any ideas what I'm doing wrong here? Can I do this?

TIA,
Graham



Relevant Pages

  • Re: Query from ms sql server question
    ... For example, in my worksheet, there a cell which user will enter the production number and macro will perform an automatic connection to sql server and query the table base on the production number and retrieve the data base on the production alone and place it on the excel sheet. ...
    (microsoft.public.excel.programming)
  • Re: ANSI_WARNINGS error in Stored Procedure
    ... The error says to set these options for your _connection_ not for the query. ... > I have a linked Server on my regular SQL server, and when I try to create ... a stored procedure that reads from the linked server, ...
    (microsoft.public.sqlserver.security)
  • Re: Pivot Table Timeout
    ... If the query takes a long time and times-out, it can be adjusted with properties in the SQL connection string. ... 'Open Connection to remote SQL Server ...
    (microsoft.public.office.developer.web.components)
  • Re: Pivot Table Timeout
    ... If the query takes a long time and times-out, it can be adjusted with properties in the SQL connection string. ... 'Open Connection to remote SQL Server ...
    (microsoft.public.office.developer.web.components)
  • Re: Problem with blank entries being filled with other values
    ... We have a table in SQL Server ... We run a Make Table query within Access, which produces a table in Access ... The connection via DDE worked. ... >> in the Counter field are replaced with values from this field in other ...
    (microsoft.public.word.mailmerge.fields)