CREATE PROCEDURE InsertAccountProfileFromXML(
    @sXML NTEXT
)
AS
begin transaction
    DECLARE @iDoc INT
    EXEC sp_xml_preparedocument @iDoc OUTPUT, @sXML
                       
INSERT INTO dbo.AccountProfile (ADDRESS,PASSWORD,USERID,EMAIL,CREDITCARD,FULLNAME)
 
 SELECT ADDRESS,PASSWORD,USERID,EMAIL,CREDITCARD,FULLNAME
    FROM OPENXML(@iDoc,'/AccountProfile/dbo.AccountProfile',2)
    WITH (	ADDRESS varchar(250) 'ADDRESS', 
			PASSWORD varchar(250) 'PASSWORD', 
			USERID varchar(250) 'USERID',
			EMAIL varchar(250) 'EMAIL',
			CREDITCARD varchar(250) 'CREDITCARD',
			FULLNAME varchar(250) 'FULLNAME');
	commit;
			
    EXEC sp_xml_removedocument @iDoc;
RETURN
