Thread: Newbie Question

  1. No Profile Picture
    wannabe übergeek
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Rep Power

    Newbie Question (displaying db)

    Alright...I have a very simple database consisting of one table with one column..the db name is Roster and the column name is Alias. I made a page where data can be put into it (I can't figure out how to edit and delete though ) and I have the script that actually puts the information into the database.

    Now this is where I'm having trouble. I want to put the database information onto a webpage in tables. I've tried so hard but to no avail. What code is needed to do this? I figured it wouldn't be so hard with only one table and column. Here is my other script.


    <TITLE>Update Roster</TITLE>
    </head><body bgcolor="#FFFFFF">
    <form action="db.asp" method=post>
    <font face="Arial" size="2">Alias:</font> <INPUT NAME="name" MaxLength=20><p>
    <INPUT TYPE=submit><p><INPUT TYPE=reset>

    and db.asp .. :

    Dim adoCon
    Set adoCon = Server.CreateObject("ADODB.Connection")
    adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("roster.mdb")
    'adoCon.Open "DSN=roster"
    adoCon.Execute "INSERT INTO Roster (Alias) VALUES (" & "'" & request.form("name") & "'" & ")"
    A:link { color: #000000; text-decoration: none }
    A:visited { color: #000000; text-decoration: none }
    A:hover {color: #000000; text-decoration: none}
    <table bgcolor="#666666" width="25%" align="center" border="1" bordercolor="#000000" cellspacing="0" cellpadding="0" style="border-collapse: collapse">
    <td width="100%" align="center"><font face="arial" size="2" color="gold">Thanks!</font></td>
    <td width="100%" align="center"><font face="arial" size="2" color="gold"><a href="index.asp">Go Back</a></font></td>

    Now how do I display this data? Any help is appreciated. Thank you for your time.
    Last edited by ThreefoldDream; July 31st, 2002 at 02:07 AM.
  2. #2
  3. Modding: Oracle MsSQL Firebird
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2001
    Outside US
    Rep Power

IMN logo majestic logo threadwatch logo seochat tools logo