Article View: borland.public.cppbuilder.database.ado
Article #1331Re: ADOCommand Parameter problem
From: Paul Cheetham
Date: Wed, 25 Aug 2004 20:05
Date: Wed, 25 Aug 2004 20:05
72 lines
3078 bytes
3078 bytes
OK, It's all sorted out.
I was missing a parameter that was expected by the stored procedure.
That's what you get when you try doing these things after 10:00 at night
:-)
In article <MPG.1b95bdd371b34c7398968d@Newsgroups.Borland.com>,
PAC.News@dsl.pipex.com says...
>
> Hi,
>
> I have a problem with a function I am writing to call a stored procedure
> on an SQL server.
> Every time I try to execute it, I get the message
> "Formal Parameter @bbActive was defined as OUTPUT but the actual
> parameter not declared OUTPUT"
>
> As can be seen from the code below, I am most definitely declaring the
> parameter as INPUT, and the following parameter is OUTPUT
>
> I am new to this type of DB programming in Builder, so any help
> appreciated.
>
>
> Thanks.
>
>
>
> TADOCommand* Command;
>
> Command = new TADOCommand (this);
> Command->Connection = dbConnection;
> Command->CommandType = cmdStoredProc;
> Command->CommandText = "pr_tblCustomers_Insert;1";
> Command->Parameters->Clear();
>
> Command->Parameters->CreateParameter ("@ssName", ftString, pdInput,
> 50, "Name");
> Command->Parameters->CreateParameter ("@ssAddress1", ftString,
> pdInput, 50, "Address 1");
> Command->Parameters->CreateParameter ("@ssAddress2", ftString,
> pdInput, 50, "Address 2");
> Command->Parameters->CreateParameter ("@ssAddress3", ftString,
> pdInput, 50, "Address 3");
> Command->Parameters->CreateParameter ("@ssAddress4", ftString,
> pdInput, 50, "Address 4");
> Command->Parameters->CreateParameter ("@ssAddress5", ftString,
> pdInput, 50, "Address 5");
> Command->Parameters->CreateParameter ("@ssPhone1", ftString, pdInput,
> 50, "Phone 1");
> Command->Parameters->CreateParameter ("@ssPhone2", ftString, pdInput,
> 50, "Phone 2");
> Command->Parameters->CreateParameter ("@ssFax", ftString, pdInput, 50,
> "Fax No");
> Command->Parameters->CreateParameter ("@ssEMail", ftString, pdInput,
> 50, "EMail Address");
> Command->Parameters->CreateParameter ("@ffEarlyDisc", ftFloat,
> pdInput, 8, 0);
--
Paul Cheetham
"There are 10 types of people in the world - those that understand
Binary, and those that don't."
Technical Details
Message-ID:
<MPG.1b97016b108e4f8d98968e@Newsgroups.Borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<MPG.1b95bdd371b34c7398968d@Newsgroups.Borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,11fa141fb6802ed3 X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII-7-bit From: Paul Cheetham <PAC.News@dsl.pipex.com> Newsgroups: borland.public.cppbuilder.database.ado Subject: Re: ADOCommand Parameter problem Date: Wed, 25 Aug 2004 21:05:32 +0100 Message-ID: <MPG.1b97016b108e4f8d98968e@Newsgroups.Borland.com> References: <MPG.1b95bdd371b34c7398968d@Newsgroups.Borland.com> Organization: None X-Newsreader: MicroPlanet Gravity v2.50 NNTP-Posting-Host: 81.86.138.235 X-Trace: newsgroups.borland.com 1093464312 81.86.138.235 (25 Aug 2004 13:05:12 -0700) Lines: 72 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail