If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Update master/detail pages (urgent)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-21-03, 17:09
Juxa Juxa is offline
Registered User
 
Join Date: Oct 2003
Posts: 1
Update master/detail pages (urgent)

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 ??

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"
%>
<!-- Building The Table Header rows -->
<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><FONT COLOR=white> Student ID</FONT></TH>
<TH BGCOLOR=navy><FONT COLOR=white> First Name </FONT></TH>
<TH BGCOLOR=navy><FONT COLOR=white> Last Name </FONT></TH>
<TH BGCOLOR=navy><FONT COLOR=white> DOB </FONT></TH>

</TR>

<%


Do while NOT oRSmt.EOF

%>
<!-- Build a row of data in the table -->

<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



Please help
Reply With Quote
  #2 (permalink)  
Old 10-22-03, 07:15
cyrus cyrus is offline
Registered User
 
Join Date: Oct 2003
Location: Pune
Posts: 59
What i can see in a code is U have closed the recordset object and after words u r trying to retrive the filed value in HREF
__________________
Cyrus
Finding ways for solution
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On