Ok. So I am pretty new a this. I have a datatable that I want to pass to a stored procedure for further manipulation. I have read some stuff on the web and it looks like I should be able to convert the datatable to XML and then pass that to the stored procedure. What am I doning wrong? I have SQL server 2005. The data never gets passed to the stored procedure.
Sub Test()
Dim dt As New DataTable
Fill datatable code omitted. there are 150 rows in the datatable after this
Dim ds As New DataSet
ds.Tables.Add(dt)
Dim x As XmlDocument
x.LoadXml(dt.DataSet.GetXml)
Dim ta As New dsTestTableAdapters.TESTRxTableAdapter
ta.ProcessFile(x)
End Sub
The Stored procedure looks like this...
ALTER PROCEDURE [dbo].[ProcessFile]
(
@x XML
)
AS
BEGIN
'DO STUFF HERE
END