🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

ADOCommand Parameter problem

#1330
From: Paul Cheetham
Date: Tue, 24 Aug 2004 21:04
73 lines
3159 bytes
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: <MPG.1b95bdd371b34c7398968d@Newsgroups.Borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!proxad.net!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,11fa141fb6802ed3,start
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: ADOCommand Parameter problem
Date: Tue, 24 Aug 2004 22:04:53 +0100
Message-ID: <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 1093381457 81.86.138.235 (24 Aug 2004 14:04:17 -0700)
Lines: 73
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!proxad.net!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail