-
VBScript/Database/ASP
I'm basically a newcomer to ASP and I was wondering if I could do something like this
Code:
<%
Dim DB as Database
Dim RS as Recordset
Set DB = "DBQ=/db/products.mdb;DRIVER={MS Access (*.mdb)}"
For Each RS in DB
Response.Write "<li>" & RS.Name
Next RS
%>
Also, If I can't do this, can I at least go thru a table getting all of the data from one field and making a list from this?
-
yes you can do this,
your can build a whole html page with asp!!
-
A couple of problems here.
First, VBScript variables are variants. This means VBScript doesn't care if you put an integer, a string or whatever in there. So, doing:
will return an error. Instead, you would do:
You should also have a reference to the adovbs file by downloading it from:
ADOVBS Article
Lastly, you are missing quite a bit, such as your sql statement, your database, etc. To learn how to read in data from a database, go to:
Connecting To DB
There are also 2 links from here to other good articles.
HTH.
-
I didn't think that code was gonna work :rolleyes:
-
the code wont work,
but what he wants to do will!