|
rdouglass -> RE: Using global date functions (12/19/2002 13:57:29)
|
I' m sorry ' bout that - I thought we could get away with it but I guess not; looping the DRW that is. However, I' ve put together an ASP script that should do the same thing. I' ve tested it on one of my testing DB' s and it seems to work. Try this code on a page, you may be able to work with it: <html> <head> <meta name=" GENERATOR" content=" Microsoft FrontPage 4.0" > <title>REC</title> </head> <body> <% DIM myTableNames, myArray , alldata, rstemp, conntemp myTableNames = " ACE_INTSUMS,RFI,CDM" myArray = split(myTableNames," ," ) FOR i = lBound(myArray) to uBound(myArray) set conntemp=server.createobject(" adodb.connection" ) conntemp.open (" DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & server.mappath(" /fpdb/myDBName.mdb" )) set rstemp=conntemp.execute(" SELECT * FROM " & myArray(i)) & " WHERE (timestamp BETWEEN #" & DateAdd(" n" ,-60,Now()) & " # AND #" & Now() & " #) ORDER BY timestamp DESC" IF rstemp.eof THEN response.write " No reports submitted in past hour ..." rstemp.close set rstemp=nothing conntemp.close set conntemp=nothing ELSE ' Now lets grab all the records alldata=rstemp.getrows rstemp.close set rstemp=nothing conntemp.close set conntemp=nothing numrows=ubound(alldata,2) FOR rowcounter= 0 TO numrows response.write " <font size=' 1' face=' Verdana' >REC #: " & alldata(0,rowcounter) & " </font><br>" NEXT END IF NEXT %> </body></html> The line in bold is the only concern I have. It is for an Access 97 DB named ' myDBName' located in the fpdb directory. Change the name to suit your environment. If it is an Access2K db, try using this line instead: conntemp.open (" Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath(" /fpdb/myDBName.mdb" )) I realize its' not the DRW, but it' s the only way I can think of to solve your problem....
|
|
|
|