Article View: borland.public.cppbuilder.database.ado
Article #1253Re: ADOCommand Parameter problem
From: king
Date: Tue, 07 Sep 2004 01:39
Date: Tue, 07 Sep 2004 01:39
79 lines
3594 bytes
3594 bytes
maybe you must create para manully!
"Paul Cheetham" <PAC.News@dsl.pipex.com> д����Ϣ����
:MPG.1b95bdd371b34c7398968d@Newsgroups.Borland.com...
>
> 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);
> Command->Parameters->CreateParameter ("@iiEarlyTime", ftInteger,
> pdInput, 4, 0);
> Command->Parameters->CreateParameter ("@ffOverCharge", ftFloat,
> pdInput, 8, 0);
> Command->Parameters->CreateParameter ("@iiPayTime", ftInteger,
> pdInput, 4, 30);
> Command->Parameters->CreateParameter ("@ffPayRate", ftFloat, pdInput,
> 8, 0);
> Command->Parameters->CreateParameter ("@bbActive", ftBoolean, pdInput,
> 1, True);
> Command->Parameters->CreateParameter ("@iiErrorCode", ftInteger,
> pdOutput, 4, 0);
>
> Command->Execute();
>
>
>
>
> --
> Paul Cheetham
>
> "There are 10 types of people in the world - those that understand
> Binary, and those that don't."
Technical Details
Message-ID:
<413d109a$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!newsfeed.icl.net!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 Reply-To: "king" <king3039@126.com> From: "king" <king3039@126.com> Newsgroups: borland.public.cppbuilder.database.ado References: <MPG.1b95bdd371b34c7398968d@Newsgroups.Borland.com> Subject: Re: ADOCommand Parameter problem Date: Tue, 7 Sep 2004 09:39:45 +0800 Lines: 81 Organization: us de X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 218.16.111.129 Message-ID: <413d109a$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1094520986 218.16.111.129 (6 Sep 2004 18:36:26 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail