Re: Multiple statement handles on one connection

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Brannon Jones [MS] (branjo_at_nospam.microsoft.com)
Date: 03/18/04

  • Next message: Brannon Jones [MS]: "Re: Stored procedure for ODBC compliant database"
    Date: Thu, 18 Mar 2004 14:15:25 -0800
    
    

    This is not possible with current versions of SQL Server or the SQL Server
    ODBC Driver, when using the default "firehose" cursor. You can use
    server-side cursors, which allow you to fetch a single row at a time from
    the server (and therefore free up the connection between each row), or you
    can cache the data from the first statement yourself (therefore freeing up
    the connection). And of course, you can open up a second connection for the
    second statement.

    -- 
    Brannon Jones
    Developer - MDAC
    This posting is provided "as is" with no warranties and confers no rights.
    "Lee Scheffler" <anonymous@discussions.microsoft.com> wrote in message
    news:b47e01c4077d$ef011af0$a101280a@phx.gbl...
    > I want to use multiple concurrently active statement
    > handles on a single connection handle.  An ODBC call to
    > SQLGetInfo with the SQL_ACTIVE_STATEMENS key returns 1,
    > indicating that there is a limit of 1 active statement on
    > a single connection.  If I try to SQLExecDirect on another
    > statement handle on the same connection handle I get an
    > error complaining that there is another active statement
    > on the same connection.
    >
    > Is there any way to configure either SQLServer or its ODBC
    > driver to allow multiple concurrently active statement
    > handles on the same connection?  This is pretty common
    > database programming practice to Exec one query, then use
    > a loop with SQLFetch and then execute multiple SQL
    > statements on another statement handle within the loop.
    > Even lowly MSAccess allows multiple concurrently active
    > statement handles on the same connection.
    >
    > My ODBC driver version is 2000.85.1022.00.
    > My SQLServer version SQL Server Developer Edition 8.00.194
    > (RTM)
    

  • Next message: Brannon Jones [MS]: "Re: Stored procedure for ODBC compliant database"

    Relevant Pages

    • Re: Client Connectivity
      ... SQL Server 2005 will accept the connection but you will not have access to new features. ... your old ODBC driver won't understand XML data types. ... That shouldn't be a problem if your application is the same age as your driver. ...
      (microsoft.public.sqlserver.setup)
    • Re: ODBC Connection to SQL Server failing
      ... >I finished up an application that uses an ODBC connection to SQL Server. ... > professional and set up an ODBC driver to the same SQL Server database. ...
      (microsoft.public.data.odbc)
    • Re: ODBC Time Out Expired
      ... > I am using vb6 to connect to SQL Server 2000 through ODBC. ... > set for ODBC driver. ... Use the SQL Server OLEDB Provider ... you can set the connection timeout by specifying a value ...
      (microsoft.public.vb.general.discussion)
    • Re: Error "SQL Server does not allow remote connections"
      ... The application could not connect to the sql server db. ... network is blocking the connection. ... SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 ... integratedSecurity, SqlConnection owningObject) +737554 ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: Connection from remote computer to network SQL Server
      ... There is no firewall on the W2K machine acting as the SQL server. ... I tried making the SQL machine a "trusted" on the router. ... connection works. ... To find the IP address of your computer inside the network, ...
      (microsoft.public.access.adp.sqlserver)