On Mon, 1 Dec 2003 22:37:41 -0200, "Massa" <massabr@ig.com.br> wrote:
[color=blue]
>I can't figure out how to make this page where I type the ID number (with a
>ok button).[/color]
A form, with a text entry box and a submit button. In your ASP that
processes that form, do a SELECT with that ID in the WHERE clause.
This is actually pretty basic, but I'd prefer not to write it
completely for you and have you figure it out so you'll learn it. It
may look something like this:
Form:
================
<html>
<head><title>Show Record</title></head>
<body>
<P><form action="ShowRecord.asp">
Show Record Number: <input type="text" size="8" name="RecordID"><BR>
<input type="submit" name="Submit" value="Show Record">
</form></P>
</body></html>
ShowRecord.asp:
=================
' Get the record ID from form
RecordID = Request.Form("RecordID")
' create the actual SQL statement to do what you ask
SQLStmt = "SELECT * FROM tblTable WHERE RecordID =" & RecordID
' Create the database connection
dbConnect = (Put your connection string here)
Set db = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
db.Open dbConnect
' Run the Query
Set rs = db.Execute(SQLstmt)
' Now display the query results in whatever format you wish...
There are plenty of ways to modify this, but the basics are here.
It's sloppy and there are better methods you'll want to learn for this
type of request, you might check some of these links for suggestions
and tutorials:
http://www.sqlcourse.com/ http://www.learnasp.com/learnasp/ (Database section to start)
http://www.aspfaq.com/show.asp?id=2424 http://www.tutorial-web.com/asp/database/ http://www.asp-help.com/database/db_tutorial1.asp
And Google for more... :)
Jeff
[color=blue]
>"Dan Brussee" <dbrussee@nc.rr.com> wrote in message
>news:peknsv8o93ra4c3d2uml5qv2dutqm49i5d@4ax.com.. .[color=green]
>> On Mon, 1 Dec 2003 21:37:23 -0200, "Massa" <massabr@ig.com.br> wrote:
>>[color=darkred]
>> >Hi all,
>> >I need some help on this one:
>> >I have a webpage with a form. This form submits data that goes to a mdb[/color][/color]
>file[color=green][color=darkred]
>> >(id (AutoNumber), name, email contry etc.). I would like to make another
>> >page where I can type the ID number and it will show all the fields only[/color][/color]
>for[color=green][color=darkred]
>> >that id.
>> >I hope I've been clear enough...
>> >Thanks a lot for you help.
>> >[/color]
>>
>> Very clear... where do you need help? Give some specific areas. I
>> assume since you can save the data, you can make a data connection,
>> etc.[/color]
>[/color]