Runtime error 3654 Internal Internet Failure MS Access 2003

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
TerenceHewettAsked:
Who is Participating?
 
harfangCommented:
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
 
peter57rCommented:
From what I can see the table is called table1, not versionnumber.
0
 
TerenceHewettAuthor Commented:
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
 
peter57rCommented:
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
 
TerenceHewettAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.