Downloading Data?

R

RoadKill

How do I create a link to download data via a query in my online Access
Database?

One thought I had was linking an Excel spreadsheet to it and having a link
to the spreadsheet so that can be downloaded. If that is the best way, then
how do I link a spreadsheet to an existing query?

Thank you
 
M

Mike Mueller

For a real-time snapshot of the data, you would need to do a few things in
the server-side scripting language of your choice
#1- set the content (mime) type to an excel spreadsheet
#2- start the content with a <table>
#3- open an SQL connection SET objConn = --connection string--
#3- use an sql statement to pull the recordset from Access SET objRS =
objConn.Execute("SELECT * FROM table)
#4- Begin loop through the records DO WHILE NOT objRS.EOF
#4a- create a table row <tr>
#4b- create table cells, populating each with the recordset columns
<td><%=objRS(0)</td>
#4c- close the table row </tr>
#4d- goto next record objRS.MoveNext
#4e- Go back to #4 LOOP
#5- close recordset objRS.Close
#6- kill recordset object SET objRS = NOTHING
#7- close connection objConn.Close
#8- kill connection object SET objConn = NOTHING
#9 end scripting page
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top