🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #1867

Re: Odd ball odbc problem

#1867
From: Valence
Date: Mon, 28 May 2007 20:37
34 lines
1869 bytes
Ok,

Got it.
The ExecDirect is covering up the error, but only because the SQLMoreResults 
needs to be called to get passed the output of the first line which does 
nothing.
More results then returns the insert error the next time. So it is necessary 
to "walk" through the results of the query one result set at a time.

That is what seems logical in 20/20 hind sight.

Thanks.
V.


"Valence" <valence.crearer@Itron.com> wrote in message 
news:465b1803$1@newsgroups.borland.com...
>I suspect this is something fundamental I'm missing:
>
> SQLExecDirect does not return an error for the following SQL:
> <snip>
> declare @test int
> set @test = 1
> raiserror('Test Error',16,1)
> <\snip>
>
> It seems that if the error occurs on the first line, then the error is 
> returned. If the error occurs after the first action, it is not. That is 
> to say that SQLGetDiagField tells me that there is no error as well as 
> SQLExecDirect returns SQL_SUCCESS.
>
> Any ideas?
> Thanks.
> 
Technical Details
Message-ID: <465b3d97@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <465b1803$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,65a02b53e18dcd13
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Valence" <valence.crearer@Itron.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <465b1803$1@newsgroups.borland.com>
Subject: Re: Odd ball odbc problem
Date: Mon, 28 May 2007 16:37:42 -0400
Lines: 36
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
NNTP-Posting-Host: 63.163.143.187
Message-ID: <465b3d97@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1180384663 63.163.143.187 (28 May 2007 13:37:43 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail