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
  4.  
  5. appAccess.DoCmd.OpenTable "Opt Outs"
  6.  
  7. appAccess.ImportXML _
  8. Datasource:="xxx.html", _
  9. ImportOptions:=acStructureAndData
  10.  
I am getting the following error:

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


MMcCarthy
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

MMcCarthy
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.

[color=#800080]http://www.oreillynet.com/pub/wlg/6937[/color]

[color=#800080]http://databasejournal.com/features/msaccess/article.php/3310901[/color]
Oct 14 '06 #3

Post your reply

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