LISTING 3: VB Code That Uses XML Bulk Load Object Model Dim xbl As SQLXMLBulkLoad ' Validate the paths. ' Create the XML Bulk Load Object. Set xbl = New SQLXMLBulkLoad ' Set up the connection to the database. xbl.ConnectionString = "provider=SQLOLEDB.1;Data Source=gonewest2;database=Test;uid=sa;pwd=" ' Set a log file for errors. xbl.ErrorLogFile = "P:\SQLMagazine\June2001\BulkLoadErrors.log" ' Run the bulk load. On Error GoTo displayerror xbl.Execute schemafile.Text, datafile.Text On Error GoTo 0