December 20, 2006 at 4:38 pm
I am importing an XML file into an access db. The table I want the file appended to is a linked SQL table. Each time I try to do this, I get import errors, saying it would create duplicate records. I have tried using a blank SQL table and still get this error.
Here is the code I am using, and it works fine if I want to append to a local table in access. Is there some way I should reference the SQL table??
Sub ImportXMLFile()
Dim objBudInfo As AdditionalData
Set objBudInfo = Application.CreateAdditionalData
Application.ImportXML "L:\AFH\ISI\ITSollutions\Prog_Devl\Annbud\Design\Test.xml", acAppendData
End Sub
December 21, 2006 at 1:01 am
This is just an idea, because I don't know anything about what you are doing. But if I were trying to get an XML file into SQL Server, I think I would have Access run a DTS package (if that is possible) rather than trying to have Access copy the data to a linked SQL table. Please remember, this is just an idea because I have just shared as much as I know. Sorry I can't really help.
Vic
[font="Comic Sans MS"]Vic[/font]
www.vicrauch.com
December 21, 2006 at 4:46 am
You have verified that the xml document is going to create a distinct value in the primary key.
Russel Loski, MCSE Business Intelligence, Data Platform
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply