Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 31st, 2002, 12:54 AM
ThreefoldDream ThreefoldDream is offline
wannabe übergeek
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: NJ
Posts: 2 ThreefoldDream User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to ThreefoldDream Send a message via AIM to ThreefoldDream
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.

Form:

<html><head>
<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>
</form></body></html>

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") & "'" & ")"
%>
<html>
<head>
<title>Thanks!</title>
<style>
A:link { color: #000000; text-decoration: none }
A:visited { color: #000000; text-decoration: none }
A:hover {color: #000000; text-decoration: none}
</style>
</head>
<body>
<table bgcolor="#666666" width="25%" align="center" border="1" bordercolor="#000000" cellspacing="0" cellpadding="0" style="border-collapse: collapse">
<tr>
<td width="100%" align="center"><font face="arial" size="2" color="gold">Thanks!</font></td>
</tr>
<tr>
<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.

Reply With Quote
  #2  
Old July 31st, 2002, 02:29 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 8th Plane (8500 - 8999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 8,527 pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level)pabloj User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Months 1 Week 1 Day 3 h 19 m 49 sec
Reputation Power: 537
adoCon.Execute "SELECT alias FROM roster" and then with a while ... you display all the rows of the table

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > Newbie Question

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap