Query an Access DB from HTML

I have an Access database on a server that I wish to query using HTML.
I have no control over the server (all I have is 10MB of space provide by my ISP) I want to be able to query the database and return a HTML page containing the results of the query.
Any suggestions?
DavidDunnAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

denamCommented:
David, You can't query a database from html.
If the server is IIS you could use asp.

Dena
0
chewymonCommented:
0
MJacksonCommented:
Ever try using ColdFusion? Its a whole lot easier to use than ASP, and works great with MS access.
 http://www.allaire.com/Products/index.cfm
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

DreamMasterCommented:
denam is right....if You can't control the fact that You have access to using ASP...now You can use ASP...on this URL You can ask for a domain that has ASP support and 30 MB webspace (for free)
http://www.ewebcity.com/

Your url will be..:

http://www4.ewebcity.com/~Yourname/

i tell You this because You need to be able to use ASP. If You can i can help You....but it doesn't really belong in this topic area...oh well....what do i care...

Max Davidse
http://www.thekitchen.nl
max@thekitchen.nl
0
DavidDunnAuthor Commented:
Max,

Thanks very much for the URL. Now I can use ASP!

Can you provide an example of some source code to query an access db?

Regards,
David
0
ewalbridgeCommented:
This site probally has the most links to ASP sites! There are alot of examples of ASP code in most of them.

http://www.aspguild.org

Eric
0
DreamMasterCommented:
You're welcome...

and for some sample code....

Ewebcity uses so called "DSN-less connections to the database...here is an example...let's say...we have a .mdb file called "employees.mdb" and a table with employers that has a name, adres, etc..

<%
Dim objConn
Dim objRst
Dim strSQL

Set objConn = Server.CreateObject("ADODB.Connection")
Set objRst = Server.CreateObject("ADODB.Recordset")

objConn.Open "DBQ=" & Server.Mappath("employees.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};"

strSQL = "SELECT name, address, phone from employers where id=1"

objRst.Open strSQL, objConn , 2, 3
%>

from there on You have the name, address and phone number of employee 1 in your variable objRst and display that...

if You need any help for that as well....here goes...

<%
    Response.Write(objRst("name"))
    Response.Write("<br>")
    Response.Write(objRst("address"))
    Response.Write("<br>")
    Response.Write(objRst("phone"))
%>

and most important....always end with:

<%
objRst.Close
Set objRst = Nothing
objConn.Close
Set objConn = Nothing
%>

i hope that was helpfull....if it doesn't....have a look at their code library....they have lots of examples there as well....

Max Davidse
http://www.thekitchen.nl
0
FRehmanCommented:
note the instruction I have database name "test" it has table name "login"
it has field "name" you want to display all the name on the page which is present in database you should have the database on same path where you run your asp file
 <!--#include file="adovbs.inc"-->
<%
Dim loginName, pwd, isNew
loginname=""
pwd=""
isNew="0"
loginName=Request.QueryString("Uname")
pwd=Request.QueryString("pwd")
set Myconn=server.CreateObject("ADODB.connection")
Myconn.Open "DRIVER={MicroSoft Access Driver (*.mdb)};DBQ=" & server.MapPath("./test.mdb")
set rs=server.CreateObject("ADODB.recordset")
rs.open "Select * from Login where usrName='" &loginName& "'" ,Myconn ,adOpenDynamic,adLockOptimistic
while not rs.eof
response.write("Name")
wend
%>

<Html>
<Head>
<Title>

</Title>
</Head>
<BODY>

<%=msg%>

</BODY>
</Html>
0
DreamMasterCommented:
uhh....i'm sorry to ask this...but how is that more of an answer then what i gave as a comment above FRehman?

i said exactly the same.....

Max Davidse
0
DavidDunnAuthor Commented:
Sorry Frehman, but I think Max has already given the answer.

Max if you 'lock' the question I will give you the points.

Thanks for the help,
David
0
DavidDunnAuthor Commented:
Do I just need to install personal web server on my home pc in order to use asp to develop my website?
0
ewalbridgeCommented:
If you are running Windows 95/98 you will need PWS, if it is Windows NT you can use PWS but IIS (Internet Information Server) is better.
0
DreamMasterCommented:
to answer Your pws question....ewalbridge is right about that...

and i was happy to be able to help You David.....

Max Davidse
http://www.thekitchen.nl
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.