dim Infods As New DataSet("Info DataSet") Infods.ReadXml(String.Format("{0}\Info.xml", systemfilepath)) dim _guid as System.Guid = System.Guid.NewGuid Dim connection As SqlConnection = New SqlConnection(My.Settings.CollectorConnectionString) Dim sbc As SqlBulkCopy = New SqlBulkCopy(connection) 'I NEED TO INSER 2 ADDITIONAL COLUMNS Infods.Tables(0).Columns.Add("CollectedZipID", GetType(System.Guid)) Infods.Tables(0).Columns.Add("CollectedFileName", GetType(System.String)) sbc.DestinationTableName = "MachineInfo" sbc.ColumnMappings.Add("MachineName", "MachineName") sbc.ColumnMappings.Add("MachineUserName", "MachineUserName") sbc.ColumnMappings.Add("OSVersion", "OSVersion") sbc.ColumnMappings.Add("BootTime", "BootTime") sbc.ColumnMappings.Add("DSXUtils", "DSXUtils") sbc.ColumnMappings.Add("EffectPatterns", "EffectPatterns") sbc.ColumnMappings.Add("CollectedZipID", "CollectedZipID") sbc.ColumnMappings.Add("CollectedFileName", "CollectedFileName") connection.Open() sbc.WriteToServer(Infods.Tables(0)) connection.Close()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)