Article View: alt.comp.databases
Article #119partial results when stored proc exec from odbc
From: Eric Reaburn
Date: Wed, 04 Jul 2001 01:50
Date: Wed, 04 Jul 2001 01:50
30 lines
2641 bytes
2641 bytes
I was wondering if anyone has had trouble executing a stored procedure from ODBC. I have a stored procedure in SQL Server 2000 that produces complete and correct results when executed from Query Analyzer. However, when it is executed from within my program via ODBC, it appears to stop (without indicating any errors) after producing partial results. In both cases it is passed the same parameters (even going as far as hard-coding the values within the stored proc!) and working on the same data. The partial result may be 0, 1, 3, 6, 7 etc. rows instead of the 153 I'm expecting. Execution has been tested through Borland C++ Builder 5 and ODBC, Delphi 5 and ODBC, Delphi 5 and BDE. Interesting point is that it works fine when exec via BDE. The logic of the proc is: open a cursor, test a condition for each row retrieved, if the condition passes do a positioned update on the current row. Using RAISERROR() as a trace, it shows that the proc manages to stop without executing any statements after the cursor loop (when run from ODBC). Is there some ODBC configuration or connection attribute that needs changing? Please help, I've been banging my head on this for two days and it's starting to hurt!
Technical Details
Message-ID:
<PBu07.123$Ok.4325@ozemail.com.au>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!pln-w!extra.newsguy.com!lotsanews.com!sjc1.nntp.concentric.net!newsfeed.concentric.net!newsfeed.ozemail.com.au!ozemail.com.au!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10a90d,a5a438986f5dba5c,start X-Google-Attributes: gid10a90d,public X-Google-Thread: fc5f9,a5a438986f5dba5c,start X-Google-Attributes: gidfc5f9,public X-Google-Thread: 104de1,a5a438986f5dba5c,start X-Google-Attributes: gid104de1,public X-Google-ArrivalTime: 2001-07-03 18:48:58 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!pln-w!extra.newsguy.com!lotsanews.com!sjc1.nntp.concentric.net!newsfeed.concentric.net!newsfeed.ozemail.com.au!ozemail.com.au!not-for-mail From: "Eric Reaburn" <ereaburn@data.com.au> Newsgroups: alt.comp.databases,borland.public.cppbuilder.database.sqlservers,comp.databases.ms-sqlserver Subject: partial results when stored proc exec from odbc Lines: 31 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Message-ID: <PBu07.123$Ok.4325@ozemail.com.au> NNTP-Posting-Host: dcanet.ozemail.com.au X-Trace: ozemail.com.au 994211311 203.108.117.209 (Wed, 04 Jul 2001 11:48:31 EST) NNTP-Posting-Date: Wed, 04 Jul 2001 11:48:31 EST Organization: OzEmail Ltd, Australia Distribution: world Date: Wed, 4 Jul 2001 11:50:46 +1000