Return-Path: Delivered-To: apmail-cayenne-dev-archive@www.apache.org Received: (qmail 89768 invoked from network); 12 Jan 2010 08:16:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Jan 2010 08:16:30 -0000 Received: (qmail 7184 invoked by uid 500); 12 Jan 2010 08:16:30 -0000 Delivered-To: apmail-cayenne-dev-archive@cayenne.apache.org Received: (qmail 7152 invoked by uid 500); 12 Jan 2010 08:16:30 -0000 Mailing-List: contact dev-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cayenne.apache.org Delivered-To: mailing list dev@cayenne.apache.org Received: (qmail 7142 invoked by uid 99); 12 Jan 2010 08:16:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jan 2010 08:16:30 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [89.20.34.134] (HELO mail.diasoft.ru) (89.20.34.134) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jan 2010 08:16:21 +0000 Received: by inmail.diasoft.ru (Postfix, from userid 100) id CDA0C4F8DC; Tue, 12 Jan 2010 11:15:58 +0300 (MSK) Received: from mail.diasoft.ru (mail.diasoft.ru [10.1.2.201]) by inmail.diasoft.ru (Postfix) with SMTP id C6A754F8F0 for ; Tue, 12 Jan 2010 11:15:54 +0300 (MSK) Received: (qmail 11197 invoked from network); 12 Jan 2010 08:15:48 -0000 Received: from pallada-n1.diasoft.ru (HELO PALLADA.diasoft.ru) (10.1.2.71) by 0 with SMTP; 12 Jan 2010 08:15:48 -0000 x-mimeole: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01CA935E.7C8FF5BA" Subject: How to run 2 queries in same connections. Date: Tue, 12 Jan 2010 11:08:55 +0300 Message-ID: <3DEE6BDD7473324C8320C35F924F1DF90553408F@PALLADA.diasoft.ru> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: How to run 2 queries in same connections. Thread-Index: AcqTXnyIix1YM2ZGS9GXPGs1WiDG6g== From: =?koi8-r?B?8tHCycPLycog5dfHxc7Jyg==?= To: X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01CA935E.7C8FF5BA Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Hello 2 everyone! =20 I have one potential problem: =20 We have stored procedure on MS SQL Server. It's doing some job and = return result in special table marked with connection id (@@SPID). =20 So next query is to get result: SELECT * FROM SpecTable WHERE spid =3D = @@SPID =20 So these 2 queries should be in same connection (to have same @@SPID). =20 In first solution there was huge transaction wrapping around this 2 = queries and I think there was same connection. But for performance proposes I can't use one huge transaction, so I = switched to explicit transaction (to not have any transaction).=20 Now I am not sure how to make sure that these queries are performed in = same connections??? =20 Evgeny. =20 ------_=_NextPart_001_01CA935E.7C8FF5BA--