Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
nemike
Starting Member
3 Posts |
Posted - 2006-01-24 : 19:43:58
|
I am trying to import an XML into a database I created in MS SQL 2005 via SQLXMLBulkLoad4. I used the .NET SDK toolkit program xsd.exe to create a XML schema for my XML file and then I pieced together code from some examples I found online in VS 2005's VB.In the following code I did provide a user I created in SQL Manager and it's password. I also used both the actual hostname and I also tried localhost (the VB is running on the same machine as MS SQL 2005)Dim objXBL As New SQLXMLBULKLOADLib.SQLXMLBulkLoad4objXBL.ConnectionString = "PROVIDER=SQLOLEDB;SERVER=hostname;UID=username;PWD=password;DATABASE=database;"objXBL.ErrorLogFile = "C:\database\database.errlog"objXBL.KeepIdentity = FalseobjXBL.Execute("C:\database\collection.xsd", "C:\database\collection.xml")objXBL = NothingI get a COMException was unhandled dialog, the view details says "Error connecting to the data source"I sure hope someone out there can help me, I've been at it for several days and haven't gotten anywhere. |
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
|
|
|
|