PROCEDURE Delete(tcID AS String) AS String LOCAL lcSchema,lcGram WITH THIS * Build the updategram header lcSchema = .cBasePath+.cSchemaFile lcGram = [<ROOT xmlns:updg="urn:schemas-microsoft-com:xml-updategram">] lcGram = lcGram+[<updg:sync mapping-schema="]+lcSchema+[">] lcGram = lcGram+[<updg:before>] * Add the pkid of the row to be deleted lcGram = lcGram+[<]+.cClassName+[ pkid="]+tcID+["/>] lcGram = lcGram+[</updg:before>] lcGram = lcGram+[<updg:after>] lcGram = lcGram+[</updg:after></updg:sync></ROOT>] lcRetVal = .SendUpdate(lcGram) ENDWITH RETURN lcRetVal ENDPROCThe Update and Insert methods are a little more complicated but as you can see, most of the effor is in building the strings to form the XML message. The SendUpdate() procedure has all the ADO stuff that moves the UPDATEGRAM to the SQL Server. I'm also using the SQLXMLOLEDB provider.