🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #1097

Re: ADO error 8179

#1097
From: Julian Lliteras
Date: Fri, 24 Dec 2004 10:53
45 lines
2072 bytes
 I tried to put a TADOStoredProc and do next:
 proc->ProcedureName = "PROC_TEST";
 proc->Parameters->Items[0]->Value = "A";
 .
 .
 .
 .
But when second statement is executed an error "index out of bounds" raises.
In design time I created all parameters and set field type and size. No idea
what's wrong.

"Julian Lliteras" <yartax@hotmail.com> escribi� en el mensaje
news:41cbf30f$1@newsgroups.borland.com...
> Hi,
>
> I get a TADOConnection and TADOQuery to execute an stored procedure and
> retrieve result. I do something like:
>
> query->SQL->Add("exec PROC_TEST
> 'A',0,0,0264207,'01/01/2005','07/01/2005','DB'");
> query->Open();
>
> This make an timeout error. But if I do query->Prepared = true first, and
> get next sentences within a sql trace:
>
> declare @P1 int
> set @P1=1
> exec sp_prepare @P1 output, NULL, N'exec PROC_TEST
> ''A'',0,0,0264207,''01/01/2005'',''07/01/2005'',''DB''
> ', 1
> select @P1
>
> This raise next error:
> Servidor: mensaje 8179, nivel 16, estado 2, procedimiento sp_prepare,
l�nea
> 3
>
> If I execute the proc_test with exact values in the ms sql editor it runs
> ok!
> What's the problem?
>
> Thanks.
> Julian
>
>
Technical Details
Message-ID: <41cbf513@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed-east.nntpserver.com!nntpserver.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <41cbf30f$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,6a3595a2c6a5f94e
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII
From: "Julian Lliteras" <yartax@hotmail.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <41cbf30f$1@newsgroups.borland.com>
Subject: Re: ADO error 8179
Date: Fri, 24 Dec 2004 11:53:09 +0100
Lines: 47
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 213.96.91.217
Message-ID: <41cbf513@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1103885587 213.96.91.217 (24 Dec 2004 02:53:07 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed-east.nntpserver.com!nntpserver.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail