I'm running the following code:
Set objBL = CreateObject("SQLXMLBulkLoad.SQLXMLBulkLoad")
objBL.ConnectionString = "provider=SQLOLEDB.1;data
source=mySQLServer;database=myDB;uid=SA;pwd=myPword"
objBL.ErrorLogFile = "c:\error.log"
objBL.Execute "c:\xml\schema.xml", "c:\xml\addresses.xml"
Set objBL = Nothing
I'm attempting to load a rather large XML file into the SQL table, however I'm receiving the error "Cannot insert the value NULL into column 'LocID', table 'myDB.dbo.myTable'; column does not allow nulls. INSERT fails."
"LocID" is my primary key and Identity field. Is there a way to prevent it from inserting NULL
into this column, since I'm just loading data, not moving it and I don't have ID fields in the XML file?