none
GridView et UpdateParameters [Incorrect syntax near '1'.] RRS feed

  • Question

  • Bonjour,
    jai le message d'erreur suivant :
    Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near '1'.

    j'ai un gridview et je crée des paramètre pour mon UpdateParameters ..
    Lorsque j'envoie le bouzin cela me balance cette erreur ..

    VOici ma Proc Stock :
    Set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    GO

    ALTER PROCEDURE [dbo].[sp_updateCustomer]
    -- Add the parameters for the stored procedure here
    @pi_ID int,
    @pi_OLDCustomerID int = null,
        @pi_FirstName nvarchar(255) = null,
        @pi_LastName nvarchar(255) = null,
        @pi_Email nvarchar(255) = null,
        @pi_CompanyName nvarchar(255) = null,
        @pi_WhereDidYouHear nvarchar(255) = null

    AS
    BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;

        -- Insert statements for procedure here
    UPDATE dbo.mnBoCustomer

    SET OLDCustomerID = @pi_OLDCustomerID,
    FirstName = @pi_FirstName,
    LastName = @pi_LastName,
    Email = @pi_Email,
    CompanyName = @pi_CompanyName,
    WhereDidYouHear = @pi_WhereDidYouHear

    WHERE CustomerID = @pi_ID
    END

    Mes parametres :
    @pi_ID = 19776 {Integer}
    @pi_FirstName = "ZZzzzzzz" {String}
    Les autres sont nuls ..


    mardi 24 octobre 2006 15:02