General discussion

Locked

Query data from Access using Front Page.

By hiltunen ·
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

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Query data from Access using Front Page.

by E.Rick In reply to Query data from Access us ...

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)

Collapse -

Query data from Access using Front Page.

by hiltunen In reply to Query data from Access us ...

Poster rated this answer

Collapse -

Query data from Access using Front Page.

by hiltunen In reply to Query data from Access us ...

This question was closed by the author

Back to Software Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums