Connecting Tech Pros Worldwide Forums | Help | Site Map

help with ImportXML method

Newbie
 
Join Date: Oct 2006
Posts: 1
#1: Oct 13 '06
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??

msquared's Avatar
Administrator
 
Join Date: Aug 2006
Location: Dublin, Ireland
Posts: 10,886
#2: Oct 14 '06

re: help with ImportXML method


As the problem is with the Datasource try posting on the XML forum as well for help.
msquared's Avatar
Administrator
 
Join Date: Aug 2006
Location: Dublin, Ireland
Posts: 10,886
#3: Oct 14 '06

re: help with ImportXML method


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]
Reply


Similar Microsoft Access / VBA bytes