help with ImportXML method

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • akay
    New Member
    • Oct 2006
    • 1

    #1

    help with ImportXML method

    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:

    Code:
    'initialize Access Database and import data from Blue Hornet
    'Dim appAccess As New Access.Application
    appAccess.OpenCurrentDatabase strDb
    
    appAccess.DoCmd.OpenTable "Opt Outs"
    
    appAccess.ImportXML _
    Datasource:="xxx.html", _
    ImportOptions:=acStructureAndData
    I am getting the following error:

    Code:
    Microsoft VBScript compilation error '800a0400' 
    
    Expected statement 
    
    /API/OptOut_API.asp, line 19 
    
    Datasource:="xxx.html", _
    -----------^
    Can someone help me please??
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    #2
    As the problem is with the Datasource try posting on the XML forum as well for help.

    Comment

    • MMcCarthy
      Recognized Expert MVP
      • Aug 2006
      • 14387

      #3
      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]

      Comment

      Working...