Query data from Access using Front Page.
Using Front Page 2000 (as an asp document)
how can you query/extract data from an Access
200 database, such as posting results form a
query
Software
Using Front Page 2000 (as an asp document)
how can you query/extract data from an Access
200 database, such as posting results form a
query
by e.rick
OK, the challenge is to answer in 1000 characters or less...
You need an ODBC File DSN created for your db (assume you know how - different question if not).
Within your asp doc you use the ADO component:
1. Create instance of the Connection object.
2. Open connection to the database.
3. Issue SQL commands to database.
4. Close connection.
A highly abbreviated example:
Dim SQLString
Set DatabaseConnection = Server.CreateObject("ADODB.Connection")
DatabaseConnection.Open "FILEDSN=YourDSNHere.dsn"
Set YourRecordset = Server.CreateObject("ADODB.Recordset")
SQLString = "SELECT field1, field2 FROM tablename WHERE conditionistrue"
YourRecordset.Open SQLString, DatabaseConnection
Set objField1 = YourRecordset("field1")
Set objField2 = YourRecordset("field2")
Do Until YourRecordset.EOF
Response.Write objField1 & " " & objField2
YourRecordset.MoveNext
Loop
DatabaseConnection.Close
Hope this helps (or is at least fit into the 1000 characters)
by hiltunen
by hiltunen
This discussion is closed to new replies.
Sort by Trending