Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 21st, 2003, 04:14 AM
CW CW is offline
Authorized User
 
Join Date: Sep 2003
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default Detail-Master updating problem

Hi.

I have Detail-Master relationship, but also i want to update the data in the detail.asp.

Inorder to display a detail.asp, i used a UseriD to store the request.form(ID)from the master.asp. Then in that UserID, i used to retrieve the detail info for that ID.

But i want to update the retrieved data in the datail.asp ?

I have added "edit" link in the detail.asp and again used the UserID , so that i will again retrieve detail info in input boxes where i can make changes to it and update.
But my problem is " the edit link can not capture the USERID".

IF i put the mouse on the link, i can only see "update_form.asp?ID = "

How can i capture the userID in teh detail.asp?
How can be updated detail.asp in Master-detail relationship ??

Thanks in advance






 
Old October 21st, 2003, 08:22 AM
CW CW is offline
Authorized User
 
Join Date: Sep 2003
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This is the code.


<html>
<head>
<title>detail</title>
</head>
<body>
<BR>
<%
UserID=Request.QueryString("ID")
dim oRSmt
set oRSmt=server.createobject("ADODB.recordset")
sqlText="Select * from Student WHERE ID="& UserID & ""
oRSmt.Open sqlText, "DSN=XYSN"
%>

 <center> <br><br><br><br><br>
   <TABLE border=1 cellspacing=1>

   <TR>
        <TD COLSPAN=6 ALIGN=CENTER> The Details </TD>
   </TR>
   <TR>
           <TH BGCOLOR=navy> Student ID</TH>
        <TH BGCOLOR=navy> First Name </TH>
        <TH BGCOLOR=navy> Last Name </TH>
        <TH BGCOLOR=navy> DOB </TH>

    </TR>

 <%


  Do while NOT oRSmt.EOF

  %>


   <TR>
      <TD><%=oRSmt("ID")%></TD>
      <TD><%=oRSmt("FirstName")%></TD>
      <TD><%=oRSmt("LastName")%></TD>
      <TD><%=oRSmt("DOB")%></TD>


    </TR>
    </center>
    <%

     oRSmt.MoveNext
Loop
oRSmt.Close
Set oRSmt = Nothing

%>

</TABLE>
 <center>
<p><a href="update_form.asp?ID="oRSmt("& UserID &")>edit</a></p>
   </center>

</body>
</html>

thanks in advance



 
Old October 22nd, 2003, 10:18 AM
CW CW is offline
Authorized User
 
Join Date: Sep 2003
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi.

again

I have got the solution of this problem.

C U

:-)






Similar Threads
Thread Thread Starter Forum Replies Last Post
master-detail hhpatek ADO.NET 0 April 3rd, 2008 02:53 PM
Master Detail prasanta2expert Access VBA 1 October 1st, 2007 06:37 AM
Master/Detail page yteferi ASP.NET 2.0 Basics 1 April 5th, 2006 04:06 PM
master/detail beeyule Dreamweaver (all versions) 1 January 18th, 2005 02:59 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.