Inserting into SQL via XML using OLEDB Consumer Templates ?



Hi

Has anyone got a sample or some links on how to insert data into SQL Server via XML ?
Only saw samples to retrieve XML up to now.


- Ideally I would like to create the XML insert statements in memory,
  not reference an external xml command file.


- If we need to insert between 10 to 10000 rows of data into SQL Server table, what options are available to do this from Visual C++ ? (Currently we use OLE DB Consumer Templates implementation that calls a stored proc for each row insert. )

Is it correct to assume that inserting 3000 rows via XML would be faster (one call) than doing 3000 stored proc calls ?

Thanx :)

	Heiko
.



Relevant Pages

  • Re: Sqlxml, Mapping Schemas and Position()
    ... I've spent a little time working with the SQL Server 2000 profiler to ... extract the FOR XML EXPLICIT commands. ... The following is the SQL statemement i intercepted using the profiler, ... >> successfully retrieve xml in the correct form. ...
    (microsoft.public.sqlserver.xml)
  • Re: XML Import options
    ... If you pass the content of the file from the client to the server ... > stored proc directly, you can use NTEXT/TEXT as stored proc parameters! ... >> when XML was ...
    (microsoft.public.sqlserver.xml)
  • Re: XML Import options
    ... and then call the procedure from your client code while passing the content ... >> stored proc directly, you can use NTEXT/TEXT as stored proc parameters! ... >>> I have a text parsing routine on the front end written many years ago ... >>> when XML was ...
    (microsoft.public.sqlserver.xml)
  • Re: Posting an entire XML document to SQL Server
    ... In SQL Server 2000, define your stored proc with a parameter of type NTEXT ... or TEXT and use your favorite provider to pass the XML (in an encoding that ...
    (microsoft.public.sqlserver.xml)
  • RE: Bad SQL Stored Proc Return Message
    ... If you select Operations -> Messages from the HAT menu, ... I know that the stored proc has to return an XML message ... > Received unexpected message type '' does not match expected type ...
    (microsoft.public.biztalk.general)