[thelist] Client-side db access (was: no subject)
Peter Hammar
phammar at dplanet.ch
Wed Aug 1 07:29:23 CDT 2001
> in short how to make a cd presentation using a databse
> and sql or ms-sql or any other.
Hi,
you could use client-side vbScript with an Access Database.
example:
<div id="content" style="position: absolute; top:200px; left:100px"></div>
<script language="vbscript">
set conn = createobject("ADODB.Connection")
conn.open "driver={Microsoft Access Driver (*.mdb)};dbq=f:\vb\db1.mdb"
set rs=conn.execute("select firstName, lastName, email from people")
str = rs.GetString(,,"</td><td>","</td></tr><tr><td>"," ")
conn.close
set conn=Nothing
str="<table><tr><th>First Name</th><th>Last
Name</th><th>Email</th></tr><tr><td>" & str & "</td></tr></table>"
document.getElementById("content").innerHTML = str
</script>
The user will get a security popup the first time she opens the page.
HTH,
Peter
More information about the thelist
mailing list