sappie
Posts: 13
|
| Posted: 10/16/2006, 1:57 AM |
|
Hello,
Probabbly a simple question, but can't find the answer on the forum (nor anywhere else).
I would like page to show a document from the database, based on the parametervalue given in the URL.
Example:
URL = http://...../Documents?DocId=12
Shown page (document) = http://..../Doc/Example.DOC
The document Example.DOC is the document name stored in the database with "DocId" = 12.
How can I achieve this?
Greeting,
H. Dröge
|
 |
 |
robertmann
Posts: 109
|
| Posted: 10/16/2006, 6:46 AM |
|
sappie,
You should create an empty page with this code in AfterInitialize
Dim Connection
Set Connection = New clsDBYourConnectioName
Connection.Open
Redirect = CCDLookUp("document_name","documents","DocId=" & CCGetParam("DocId","0"), Connection)
Connection.Close
Set Connection = Nothing
YourConnectioName needs to be your real connection name. Same with field and table names.
_________________
Robert |
 |
 |
sappie
Posts: 13
|
| Posted: 10/16/2006, 6:49 AM |
|
Hello Robert,
Just a minute ago I was trying a similar solution. Combinedwith a 'redirect' it indeed gives the desired result!
Thanks for your help!
Sappie.
|
 |
 |
|