2012-10-17 56 views
0

我試圖執行SQLXMLBulkLoad時遇到此錯誤。以下是該對象的配置:SQLXMLBulkLoad:COMExecption被捕獲,連接到數據源的錯誤

Public Shared objbl As New SQLXMLBULKLOADLib.SQLXMLBulkLoad4 
objbl.ConnectionString = ReadVariables("Data Source=localhost;Initial Catalog=db1;Integrated Security=True") 
objbl.ErrorLogFile = workingdirectory & "\error.log" 
objbl.TempFilePath = workingdirectory 
objbl.CheckConstraints = True 
objbl.KeepIdentity = False 
objbl.Transaction = True 
objbl.FireTriggers = True 
objbl.Execute(workingdirectory & "\xsdtempfile.xsd", fname) 

源和目標位於locahost上。

我無法看到連接字符串有什麼問題。

錯誤發生在這條線:

objbl.Execute(workingdirectory & "\xsdtempfile.xsd", fname) 

誰能給我個忙嗎?

+0

不是一個真正的SQL問題 –

+0

有什麼錯誤信息? –

+0

@RomanPekar,在這個線程的標題。 – Testifier

回答

0
objbl.ConnectionString = "Provider=sqloledb;server=localhost;database=db1;integrated security=SSPI" 

或試試這個

objbl.ConnectionString = "Provider=sqloledb;server=localhost;database=db1;user id=User;password=Password;persist security info=True;Connect Timeout=30"