none
Column name or number of supplied values does not match table definition.

    Question

  • Foll. stored procedure shows the same error (columns not matching) , i have one identity column that is not mentioned here.

    If i add the identity column on management studio the error goes but fails at run time.

    pl. help

    thanks

    anup

     

    set ANSI_NULLS ON

    set QUOTED_IDENTIFIER ON

    go

    ALTER PROC [dbo].[spaddreqcd] @reqdata nText

    AS

    DECLARE @hDoc int

    exec sp_xml_preparedocument @hDoc OUTPUT,@reqdata

    Insert Into wbreqcd

    SELECT CompName, CompAddress,CompCountry,CompZip,CompURL,CompEmail,Person,Desig,Phone,Fax,Nature,Relate,Comments

    FROM OPENXML (@hdoc, '/root/reqdata',1)

    WITH ( CompName varchar(50), CompAddress varchar(100), CompCountry varchar(50) ,CompZip varchar(10), CompURL varchar(50) ,CompEmail varchar(50) ,Person varchar(50) ,Desig varchar(50) ,Phone varchar(50) ,Fax varchar(20),Nature varchar(50),Relate varchar(50),Comments varchar(100) )

    EXEC sp_xml_removedocument @hDoc

    RETURN

    Thursday, October 18, 2007 8:05 AM

Answers

  • sorry to say identity specification was false was the reason,

    added the identity spec as true - now works fine !

     

    regards,

    anup

    Thursday, October 18, 2007 11:05 AM

All replies