By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,154 Members | 2,405 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,154 IT Pros & Developers. It's quick & easy.

help with ImportXML method

P: 1
So I'll start by saying I'm very new to programming VB Scripts...

Anyways, I'm trying to program an API for my company.

I start by creating an HTML pages which POSTs my login data to a webpags. The POST call returns a database in XML.

I am trying to import this XML database into Access with the following code:

Expand|Select|Wrap|Line Numbers
  1. 'initialize Access Database and import data from Blue Hornet
  2. 'Dim appAccess As New Access.Application
  3. appAccess.OpenCurrentDatabase strDb
  5. appAccess.DoCmd.OpenTable "Opt Outs"
  7. appAccess.ImportXML _
  8. Datasource:="xxx.html", _
  9. ImportOptions:=acStructureAndData
I am getting the following error:

Expand|Select|Wrap|Line Numbers
  1. Microsoft VBScript compilation error '800a0400' 
  3. Expected statement 
  5. /API/OptOut_API.asp, line 19 
  7. Datasource:="xxx.html", _
  8. -----------^
Can someone help me please??
Oct 13 '06 #1
Share this Question
Share on Google+
2 Replies

Expert Mod 10K+
P: 14,534
As the problem is with the Datasource try posting on the XML forum as well for help.
Oct 14 '06 #2

Expert Mod 10K+
P: 14,534
Also check out these links. I'm no expert but I think your datasource has to have an xml extension.


Oct 14 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.