﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » Incorrect # of parameters passed</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 14:17:14 GMT</lastBuildDate><ttl>20</ttl><item><title>Incorrect # of parameters passed</title><link>http://forum.strataframe.net/FindPost13348.aspx</link><description>Any clue what would cause this?&lt;br&gt;
&lt;br&gt;
PRMILLNBR is getting passed twice as you can see, so there are 10 values when 9 are needed. &lt;br&gt;
&lt;br&gt;
This results in error:&lt;br&gt;
  SQL0313N: The number of host variables in the EXECUTE or OPEN statement is not equal to the number of values required.&lt;br&gt;
&lt;br&gt;
************************** DEBUG INFO ***********************&lt;br&gt;
Command #: 	1&lt;br&gt;
Timestamp: 	2008-01-10 18:12:12.559&lt;br&gt;
General Command Settings&lt;br&gt;
Command Type: 	Text&lt;br&gt;
Object Type: 	DDTek.DB2.DB2Command&lt;br&gt;
Connection String: 	Database=S1094B1B;User ID=QSECOFR;Server=192.168.42.100:446&lt;br&gt;
Transaction: 	False&lt;br&gt;
Command Settings&lt;br&gt;
CommandText: 	INSERT INTO "SIGMA"."INSTYPRPF" ("PRMILLNBR", "PRSTYLNBR", "PRUNITMEAS", "PRSIZECODE", "PRCUTCOST", "PRROLLCOST", "PRCUTRETL", "PRROLLRETL", "PRROWVERSION") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)&lt;br&gt;
Command Parameters&lt;br&gt;
P0: 	'1' [DbType: Decimal | Size: 0 | Direction: Input | SourceColumn: PRMILLNBR | SourceVersion: Current]&lt;br&gt;
P1: 	'2' [DbType: Decimal | Size: 0 | Direction: Input | SourceColumn: PRSTYLNBR | SourceVersion: Current]&lt;br&gt;
P2: 	'' [DbType: StringFixedLength | Size: 3 | Direction: Input | SourceColumn: PRUNITMEAS | SourceVersion: Current]&lt;br&gt;
P3: 	'' [DbType: StringFixedLength | Size: 3 | Direction: Input | SourceColumn: PRSIZECODE | SourceVersion: Current]&lt;br&gt;
P4: 	'1' [DbType: Decimal | Size: 0 | Direction: Input | SourceColumn: PRCUTCOST | SourceVersion: Current]&lt;br&gt;
P5: 	'0' [DbType: Decimal | Size: 0 | Direction: Input | SourceColumn: PRROLLCOST | SourceVersion: Current]&lt;br&gt;
P6: 	'2' [DbType: Decimal | Size: 0 | Direction: Input | SourceColumn: PRCUTRETL | SourceVersion: Current]&lt;br&gt;
P7: 	'0' [DbType: Decimal | Size: 0 | Direction: Input | SourceColumn: PRROLLRETL | SourceVersion: Current]&lt;br&gt;
P8: 	'0' [DbType: Int32 | Size: 0 | Direction: Input | SourceColumn: PRROWVERSION | SourceVersion: Current]&lt;br&gt;
P9: 	'1' [DbType: Decimal | Size: 0 | Direction: Input | SourceColumn: PRMILLNBR | SourceVersion: Current]</description><pubDate>Fri, 11 Jan 2008 13:44:26 GMT</pubDate><dc:creator>Keith Chisarik</dc:creator></item><item><title>RE: Incorrect # of parameters passed</title><link>http://forum.strataframe.net/FindPost13382.aspx</link><description>No clue, Keith, because I can't get it to fail... it might be that my source has changed since you got the version when you purchased the provider... I'll email you the latest version and we'll see if that makes a difference.</description><pubDate>Fri, 11 Jan 2008 13:44:26 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Incorrect # of parameters passed</title><link>http://forum.strataframe.net/FindPost13380.aspx</link><description>For some reason, that field was completely left out of the INSERT...&lt;/P&gt;&lt;P&gt;Let me see if I can't dump this designer file into a project and test it.</description><pubDate>Fri, 11 Jan 2008 13:31:02 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Incorrect # of parameters passed</title><link>http://forum.strataframe.net/FindPost13378.aspx</link><description>Is the PR_PK field an auto-assigned value within DB2?</description><pubDate>Fri, 11 Jan 2008 13:29:12 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Incorrect # of parameters passed</title><link>http://forum.strataframe.net/FindPost13367.aspx</link><description>File sent as requested, thank you.</description><pubDate>Fri, 11 Jan 2008 12:54:44 GMT</pubDate><dc:creator>Keith Chisarik</dc:creator></item><item><title>RE: Incorrect # of parameters passed</title><link>http://forum.strataframe.net/FindPost13351.aspx</link><description>I'm looking through the code, and it doesn't look like those primary key fields should be included in the Fields collection of the QueryInfo object, so I'm not sure why that one is showing up twice.&amp;nbsp; Could you email me the .designer.vb file for that business object?&amp;nbsp; I'll take a look at it and see if there is something strange there causing the problem.&amp;nbsp; Thanks.</description><pubDate>Fri, 11 Jan 2008 08:13:31 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Incorrect # of parameters passed</title><link>http://forum.strataframe.net/FindPost13349.aspx</link><description>More info:&lt;br&gt;
&lt;br&gt;
It does not do it when I change the primary key to a new field that auto increments.&lt;br&gt;
&lt;br&gt;
The key on the table (set via BO Mapper) when it has the above errors was a concatenated key:&lt;br&gt;
&lt;br&gt;
PRIMARY KEY( PRMILLNBR, PRSTYLNBR)</description><pubDate>Thu, 10 Jan 2008 17:28:49 GMT</pubDate><dc:creator>Keith Chisarik</dc:creator></item></channel></rss>