Welcome to Sign in | Help

Re: Sincronizare SQLServer Express

  •  09-03-2007, 1:26 PM

    Re: Sincronizare SQLServer Express

    Tabela mesaje are o singura coloana numita [mesaj] de tip XML. Deci insert-ul nu se poate compila:

    Msg 213, Level 16, State 1, Procedure repl_insert, Line 17
    Insert Error: Column name or number of supplied values does not match table definition.

    Ca sa pot sa te ajut te rog sa te asiguri ca codul SQL care-l postezi poate fi compilat. Problema trebuie sa fie in continuare in codul tau pentru ca variabilele au valoarea corecta, dupa cum se poate vedea cu un simplu SELECT:

    ALTER PROCEDURE [dbo].[repl_insert]
    AS
    BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.

    declare @conversation uniqueidentifier
    declare @msg xml,@msgtype nvarchar(128)
    SET NOCOUNT ON;
    begin transaction
    ;receive top(1) @conversation=conversation_handle,@msgtype=message_type_name,@msg=message_body from replicare
    select @conversation, @msgtype, @msg
    commit
    END

    GO

    exec [repl_insert]

    Resulta:

    5728A4E5-3A52-DC11-AC20-0013723DF0DA insertie <boys><boy FirstName="dfdfdf" Counter="0" Year="88" /></boys> 

     


    http://rusanu.com
View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems