[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Runtime error 3654 Internal Internet Failure MS Access 2003

Posted on 2007-10-15
5
Medium Priority
?
695 Views
Last Modified: 2013-11-28
Hi experts,

I am trying to access data stored in a HTML table on my website and transfering this value into my database through an import control.  I am getting an error message 3654 Internal Internet Failure and do not know how to get around this problem.  The code I am using is as follows:

Private Sub Command0_Click()
Dim db As DAO.Database
Dim td As DAO.TableDef

Set db = CurrentDb()

Set td = db.CreateTableDef("versionnumber")
td.Connect = "HTML Import;HDR=YES;IMEX=1;DATABASE=http://www.e2s-application-systems.com/BCExpert/versionnumber.htm"
td.SourceTableName = "VersionNumber"
Call db.TableDefs.Append(td)

Dim rs As DAO.Recordset

Set rs = db.OpenRecordset("select count(*) from versionnumber")
Debug.Print rs.Fields(0).Value
Call rs.Close  

End Sub

I would be grateful for any help.

Regards,
Terry
0
Comment
Question by:TerenceHewett
  • 2
  • 2
5 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 20077253
From what I can see the table is called table1, not versionnumber.
0
 

Author Comment

by:TerenceHewett
ID: 20077723
Hi Peter,

Many thanks for your post. I have substituted as suggested with table1 but still getting the same error message 3654 Internal Internet Failure.  Did you manage to avoid this message?

Private Sub Command0_Click()
Dim db As DAO.Database
Dim td As DAO.TableDef

Set db = CurrentDb()

Set td = db.CreateTableDef("table1")
td.Connect = "HTML Import;HDR=YES;IMEX=1;DATABASE=http://www.e2s-application-systems.com/BCExpert/versionnumber.htm"
td.SourceTableName = "table1"
Call db.TableDefs.Append(td)

Dim rs As DAO.Recordset

Set rs = db.OpenRecordset("select count(*) from table1")
Debug.Print rs.Fields(0).Value
Call rs.Close

End Sub

Any further help would be appreciated.

Regards
Terry
0
 
LVL 77

Expert Comment

by:peter57r
ID: 20078021
I have never done this before - I can't comment on the validity of the code you are using.
I could just see that the table id was wrong.

0
 
LVL 58

Accepted Solution

by:
harfang earned 2000 total points
ID: 20078728
Hello.

Your code comes from:

Reading HTML Tables with the JET HTML Import Installable ISAM Driver
http://ewbi.blogs.com/develops/2006/12/reading_html_ta.html

(It's useful to provide us with the link of the code you are trying to adapt.)

The original code works as expected, with the provided URL. I notice three differences between your table and the one used in the example: you set an ID (ad Pete noted), you used a SourceTableName not found in the HTML source,  and you do not include headers. This would conflict with your setting: HDR=YES.

If you try this simple variant:

Set td = db.CreateTableDef("versionnumber")
td.Connect = "HTML Import;HDR=NO;IMEX=1;DATABASE=http://www.e2s-application-systems.com/BCExpert/versionnumber.htm"
Call db.TableDefs.Append(td)

You get a more explicit message: No field defined--cannot append TableDef or Index.

Try it with a header row in your table.

Good luck!
(°v°)
0
 

Author Comment

by:TerenceHewett
ID: 20162319
Thank you for your posts and sorry for the delay in responding.  Harfang, point noted on giving the place that the code I wish to adapt comes from.

Regards,
Terry
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question