OLEDBDDM.ASP

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 
<html>

<head>
<title>Microsoft OLE DB Provider for AS/400 and VSAM - Active Server Pages Sample</title>
</head>

<body bgcolor="#FFFFFF">

<div align="center"><center>

<table border="0">
<tr>
<em><strong>Microsoft OLE DB Provider for AS/400 and VSAM - Active Server Pages Sample</strong></em></font></td>
</tr>
</table>
</center></div>


<form action="oledbddm.asp" method="POST">
<input type="hidden" name="action" value="30"><div
align="center"><center><table border="0" cellspacing="0"
width="300">
<tr>
<td align="right"><font size="3">First Name:</font></td>
<td><font size="3"><% =rtrim(Session("RS")(2))%> </font></td>
</tr>
<tr>
<td align="right"><font size="3">Last Name:</font></td>
<td><font size="3"><% =rtrim(Session("RS")(1))%></font></td>
</tr>
<tr>
<td align="right"><font size="3">Address:</font></td>
<td><font size="3"><% =rtrim(Session("RS")(4))%></font></td>
</tr>
<tr>
<td align="right"><font size="3">ID:</font></td>
<td><font size="3"><% =rtrim(Session("RS")(0))%></font></td>
</tr>
<tr>
<td align="right"><font size="3">City &amp; State:</font></td>
<td><font size="3"><% =rtrim(Session("RS")(5)) & " "%><% =rtrim(Session("RS")(6))%></font></td>
</tr>
<tr>
<td align="right"><font size="3">Zip Code:</font></td>
<td><font size="3"><% =rtrim(Session("RS")(7))%></font></td>
</tr>
<tr>
<td align="right"><font size="3">Phone Number:</font></td>
<td><font size="3"><% =rtrim(Session("RS")(3))%></font></td>
</tr>
<tr>
<td align="right"><font size="3">Contract:</font></td>
<td><font size="3"><% =rtrim(Session("RS")(8))%></font></td>
</tr>

</table>
</center></div>
</form>

<form>
<div align="center"><center><table border="0" cellspacing="0" nowrap >
<tr>
<input
type="button"
name="MoveFirst"
value="&lt;&lt; First"
onclick="top.location='oledbddm.asp?action=1'">

<input
type="button"
name="MovePrevious"
value="&lt; Prev "
onclick="top.location='oledbddm.asp?action=2'">

<input type="button" name="MoveNext"
value="Next &gt; "
onclick="top.location='oledbddm.asp?action=3'">

<input type="button" name="MoveLast"
value="Last &gt;&gt;"
onclick="top.location='oledbddm.asp?action=4'">

</tr>
</table>
</center></div>
</form>

</body>
</html>

<%
'This sample is based on host tables similar to those in the Microsoft SQL Server Pubs sample database

On Error Resume Next

If Session("Connect Error") = True Then
Session("Connect Error") = False
Response.Redirect "message.asp"
End If

Select Case Request("action")
Case 1
Session("RS").MoveFirst

Case 2
Session("RS").MovePrevious
If Session("RS").BOF = True Then
Session("RS").MoveFirst
End If

Case 3
Session("RS").MoveNext
If Session("RS").EOF = True Then
Session("RS").MoveLast
End If

Case 4
Session("RS").MoveLast

Case 11
If Session("RS").Source = "PUBS/AUID" Then
BM = Session("RS").Bookmark
Set Session("RS") = Nothing
Set Session("RS") = Session("RS2")
Session("RS").Bookmark = BM
Else
BM = Session("RS").Bookmark
Set Session("RS") = Nothing
Set Session("RS") = Session("RS1")
Session("RS").Bookmark = BM
End If

Case 30
Session("RS")(3) = RTrim(CStr(Request("Phone")))
Session("RS")(4) = RTrim(CStr(Request("Address")))
Session("RS")(5) = RTrim(CStr(Request("City")))
Session("RS")(6) = RTrim(CStr(Request("State")))
Session("RS")(7) = RTrim(CStr(Request("Zip")))
Session("RS")(8) = RTrim(CStr(Request("Contract")))
Session("RS").UpdateBatch
End Select
%>



<!--
' Last updated on 10/9/97.
' Copyright 1997 Microsoft Corporation
-->