On Aug 18, 5:41 pm, "Karl" <some...@sbcglobal.bizwrote:
Quote:
Does anyone have a sample of an .hta file.
>
I need to put Access data in a local webpage. The data needs to be displayed
in an html table.(like a continous form)
>
So far I have the following but don't know how to get the data on an html
table
>
<html>
<head>
</head>
<Script Language="VBScript">
Dim conn
sub dotheconnection
Set conn = CreateObject("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=C:\aqGuestSeating8\GuestSeatingSytem3.mdb"
If conn.errors.count <0 Then
alert("problem connecting to the database")
else
' if connected OK call sub getdata
getdata
end if
end sub
sub getdata
SQL_query = "SELECT * FROM tGuestsWaiting"
Set rsData = conn.Execute(SQL_query)
Do Until rsData.EOF = True
' need to display table of data here xxxxxxxxxxxxx
rsData.moveNext ' go to next record
Loop
end sub
</script>
<body>
Finished
</body>
</html>
|
If I understand the question, you have to build and html string in
your loop
and then set the innerHTML property of some element in your html to
the
string you end up with.
Somewhere in your html: <div id="myContent"></div>
code snippet:
Dim sContent
Do Until rsData.EOF = True
'build html string
sContent = sContent & rs(0) & "<br>"
rsData.moveNext ' go to next record
myContent.innerHTML = sContent