D
Douglas Buchanan
Where is the problem?
Find Below
•Exception
•Stored procedure
•Table Definition
•XML Dataset
=== The Exception ================================
System.Data.SqlClient.SqlException: Procedure or function F1Ins has
too many arguments specified.
at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows,
DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String
srcTable)
at Test_lkp01RefSource.Form1.Button2_Click(Object sender, EventArgs e)
in C:\Documents and Settings\DBuchanan\My Documents\Visual Studio
Projects\Test_lkp01RefSource\Form1.vb:line 167
An unhandled exception of type 'System.Data.SqlClient.SqlException'
occurred in Test_lkp01RefSource.exe
Additional information: System error.
=== End ========================================
=== The Stored procedure ==========================
CREATE PROCEDURE [dbo].[F1Ins]
(
@RefSource varchar(25),
@ord tinyint,
@hide bit
)
AS
SET NOCOUNT OFF;
INSERT INTO lkp01RefSource(RefSource, ord, hide) VALUES (@RefSource,
@ord, @hide);
SELECT RefSourceID, RefSource, ord, hide FROM lkp01RefSource WHERE
(RefSourceID = @@IDENTITY);
GO
=== End ========================================
=== The Table Definition ============================
CREATE TABLE [dbo].[lkp01RefSource] (
[RefSourceID] [tinyint] IDENTITY (1, 1) NOT NULL ,
[RefSource] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[ord] [tinyint] NOT NULL ,
[hide] [bit] NOT NULL
) ON [PRIMARY]
GO
=== End ========================================
=== The XML Dataset ==============================
<?xml version="1.0" standalone="yes"?>
<xs:schema id="Dsf1" targetNamespace="http://www.tempuri.org/Dsf1.xsd"
xmlns:mstns="http://www.tempuri.org/Dsf1.xsd"
xmlns="http://www.tempuri.org/Dsf1.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:element name="Dsf1" msdata:IsDataSet="true">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="lkp01RefSource">
<xs:complexType>
<xs:sequence>
<xs:element name="RefSourceID" msdata:ReadOnly="true"
msdata:AutoIncrement="true" type="xs:unsignedByte" />
<xs:element name="RefSource" type="xs:string" />
<xs:element name="ord" type="xs:unsignedByte" default="0"/>
<xs:element name="hide" type="xs:boolean" default="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:unique name="Constraint1" msdatarimaryKey="true">
<xs:selector xpath=".//mstns:lkp01RefSource" />
<xs:field xpath="mstns:RefSourceID" />
</xs:unique>
</xs:element>
</xs:schema>
=== End ========================================
Find Below
•Exception
•Stored procedure
•Table Definition
•XML Dataset
=== The Exception ================================
System.Data.SqlClient.SqlException: Procedure or function F1Ins has
too many arguments specified.
at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows,
DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String
srcTable)
at Test_lkp01RefSource.Form1.Button2_Click(Object sender, EventArgs e)
in C:\Documents and Settings\DBuchanan\My Documents\Visual Studio
Projects\Test_lkp01RefSource\Form1.vb:line 167
An unhandled exception of type 'System.Data.SqlClient.SqlException'
occurred in Test_lkp01RefSource.exe
Additional information: System error.
=== End ========================================
=== The Stored procedure ==========================
CREATE PROCEDURE [dbo].[F1Ins]
(
@RefSource varchar(25),
@ord tinyint,
@hide bit
)
AS
SET NOCOUNT OFF;
INSERT INTO lkp01RefSource(RefSource, ord, hide) VALUES (@RefSource,
@ord, @hide);
SELECT RefSourceID, RefSource, ord, hide FROM lkp01RefSource WHERE
(RefSourceID = @@IDENTITY);
GO
=== End ========================================
=== The Table Definition ============================
CREATE TABLE [dbo].[lkp01RefSource] (
[RefSourceID] [tinyint] IDENTITY (1, 1) NOT NULL ,
[RefSource] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[ord] [tinyint] NOT NULL ,
[hide] [bit] NOT NULL
) ON [PRIMARY]
GO
=== End ========================================
=== The XML Dataset ==============================
<?xml version="1.0" standalone="yes"?>
<xs:schema id="Dsf1" targetNamespace="http://www.tempuri.org/Dsf1.xsd"
xmlns:mstns="http://www.tempuri.org/Dsf1.xsd"
xmlns="http://www.tempuri.org/Dsf1.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:element name="Dsf1" msdata:IsDataSet="true">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="lkp01RefSource">
<xs:complexType>
<xs:sequence>
<xs:element name="RefSourceID" msdata:ReadOnly="true"
msdata:AutoIncrement="true" type="xs:unsignedByte" />
<xs:element name="RefSource" type="xs:string" />
<xs:element name="ord" type="xs:unsignedByte" default="0"/>
<xs:element name="hide" type="xs:boolean" default="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:unique name="Constraint1" msdatarimaryKey="true">
<xs:selector xpath=".//mstns:lkp01RefSource" />
<xs:field xpath="mstns:RefSourceID" />
</xs:unique>
</xs:element>
</xs:schema>
=== End ========================================