![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi to everybody! I'm doing a XML Bulk Load of multiple XML files and given that there are a lot of them, it must fully be automatic. However some of these files have not been validated and contain errors that stop executing the DTS. As a result, I must extract the problematic XML files and restart the process which means human intervention. Does anybody know a way to make the ActiveX DTS continue Bulk Loading the rest of XML files when an error is found? Can it be done at the VBS level? (I've also posted my VBS script). Any help will be wellcomed. Function Main() Dim objSQLXMLBulkLoad Set objSQLXMLBulkLoad = CreateObject("SQLXMLBulkLoad.SQLXMLBulkLoad.3.0") objSQLXMLBulkLoad.ConnectionString = _ "PROVIDER=SQLOLEDB.1;SERVER=.;UID=sa;PWD=;DATABASE =FinalMultiple;" objSQLXMLBulkLoad.SchemaGen = true objSQLXMLBulkLoad.SGDropTables = false objSQLXMLBulkLoad.CheckConstraints = True objSQLXMLBulkLoad.SGUseID=True objSQLXMLBulkLoad.KeepIdentity = False Dim sFolder sFolder="C:\Multiple\" Dim fso, f, f1, fc, s Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFolder(sFolder) Set fc = f.Files For Each f1 in fc objSQLXMLBulkLoad.ErrorLogFile = "C:\Error.log" objSQLXMLBulkLoad.Execute "C:\Modified_data\file.xsd", sFolder & f1.name Next Set objSQLXMLBulkLoad = Nothing Main = DTSTaskExecResult_Success End Function Greetings, David Grant |
![]() |
| Thread Tools | |
| Display Modes | |
| |