Displaying 'html code' from an Access da

Results 1 to 2 of 2

Thread: Displaying 'html code' from an Access da

  1. #1
    Join Date
    Dec 1969

    Default Displaying 'html code' from an Access da

    What I want to do is to display different articles based on what link is clicked on a page that lists name of all articles. So, if the first link is clicked, I want database to load the first article's text. The text would actually be html code because it would involve tags such as <font>, <b>, etc. So, I would have a page called articles.asp and it would load the correct text or html code (page) depending on the link clicked. I want to use only an integer to identify the artilce so the link would be something like artilces.asp?ArticleNum=1. What I don't know is that what I have to do in the database so that it would load the html code. I'm using an Access database on Windows 2000 server. I think this shouldn't be difficult for you guys. I hope this makes sense but if doesn't just think of newspaper web sites where they identify articles based on date, etc and a page loads the respective news depending on what link was clicked. Please help, thanks!

  2. #2
    Join Date
    Dec 1969

    Default RE: Displaying 'html code' from an Acces

    Nothing real special.<BR>Make sure you use the "Memo" type field in access to store your articles, allows 64,000 caracters i believe...<BR><BR>You will need somekind of identifyer to go with article which would match the article number you use in your link.<BR>ie: <BR>TableName = Myarticles<BR>Fields = ID, Article<BR>Now say you have this for a record.<BR>ID = 20 and article = Whatever inside<BR><BR>Do this for your link<BR>artilces.asp?ArticleNum=20<BR>On page where you want to disply this.<BR><BR>Dim intArticle<BR>intArticle = (Request.QueryString("ArticleNum"))<BR><BR>sql="Se lect Myarticles.Article From Myarticles Where ((Myarticles.ID)= "&intArticle&") "<BR><BR>Response.Write rs("Articles")<BR><BR>Should do the trick.<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts