01.
<%
Option
Explicit %>
02.
<html>
03.
<head>
04.
<title>ThaiCreate.Com ASP & Oracle Tutorial</title>
05.
</head>
06.
<body>
07.
<form action=
"ASPOracleEditRecordSave.asp?CusID=<%=Request.QueryString("
CusID
")%>"
name=
"frmEdit"
method=
"post"
>
08.
<%
09.
Dim
Conn,strSQL,objRec
10.
Set
Conn = Server.Createobject(
"ADODB.Connection"
)
11.
Conn.Open
"Driver={Oracle in OraHome92};DBQ=TCDB;UID=myuser;PWD=mypassword;"
12.
strSQL =
"SELECT * FROM customer WHERE CustomerID = '"
&Request.QueryString(
"CusID"
)&
"' "
13.
Set
objRec = Conn.Execute(strSQL)
14.
If
objRec.EOF
Then
15.
Response.write(
"Not found CustomerID="
&Request.QueryString(
"CusID"
))
16.
Else
17.
%>
18.
<table width=
"600"
border=
"1"
>
19.
<tr>
20.
<th width=
"91"
> <div align=
"center"
>CustomerID </div></th>
21.
<th width=
"160"
> <div align=
"center"
>Name </div></th>
22.
<th width=
"198"
> <div align=
"center"
>Email </div></th>
23.
<th width=
"97"
> <div align=
"center"
>CountryCode </div></th>
24.
<th width=
"70"
> <div align=
"center"
>Budget </div></th>
25.
<th width=
"70"
> <div align=
"center"
>Used </div></th>
26.
</tr>
27.
<tr>
28.
<td><div align=
"center"
><input type=
"text"
name=
"txtCustomerID"
size=
"5"
value=
"<%=objRec.Fields("
CustomerID
")%>"
></div></td>
29.
<td><input type=
"text"
name=
"txtName"
size=
"20"
value=
"<%=objRec.Fields("
Name
")%>"
></td>
30.
<td><input type=
"text"
name=
"txtEmail"
size=
"20"
value=
"<%=objRec.Fields("
Email
")%>"
></td>
31.
<td><div align=
"center"
><input type=
"text"
name=
"txtCountryCode"
size=
"2"
value=
"<%=objRec.Fields("
CountryCode
")%>"
></div></td>
32.
<td align=
"right"
><input type=
"text"
name=
"txtBudget"
size=
"5"
value=
"<%=objRec.Fields("
Budget
")%>"
></td>
33.
<td align=
"right"
><input type=
"text"
name=
"txtUsed"
size=
"5"
value=
"<%=objRec.Fields("
Used
")%>"
></td>
34.
</tr>
35.
</table>
36.
<input type=
"submit"
name=
"submit"
value=
"submit"
>
37.
<%
38.
End
IF
39.
objRec.Close()
40.
Conn.Close()
41.
Set
objRec =
Nothing
42.
Set
Conn =
Nothing
43.
%>
44.
</form>
45.
</body>
46.
</html>