 |
|
Code (ASP)
<% Option Explicit %>
<html>
<head>
<title>Save Record Cisco</title>
</head>
<body>
<%
Response.write("Not found ID="&Request.QueryString("CusID1"))
Response.write("Not found ID="&Request.QueryString("CusID2"))
Dim Conn,strSQL,objExec,strSQL2,objExec2
Set Conn = Server.Createobject("ADODB.Connection")
Conn.Open "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("mydatabase.mdb"),"" , ""
strSQL = "UPDATE MyTable SET "
strSQL = strSQL&" IP = '"&Request.Form("txtIP")&"' "
strSQL = strSQL&",Version = '"&Request.Form("txtVersion")&"' "
strSQL = strSQL&",SwImage = '"&Request.Form("txtSwImage")&"' "
strSQL = strSQL&",Port = '"&Request.Form("txtPort")&"' "
strSQL = strSQL&",Status = '"&Request.Form("txtStatus")&"' "
strSQL = strSQL&",Description = '"&Request.Form("txtDescription")&"' "
strSQL = strSQL&" where (IP= '"&Request.QueryString("CusID1")&"' and Port= '"&Request.QueryString("CusID2")&"' )"
Set objExec = Conn.Execute(strSQL)
strSQL2 = "UPDATE Table1 SET "
strSQL2 = strSQL2&" IP = '"&Request.Form("txtIP")&"' "
strSQL2 = strSQL2&",Equipment_Name = '"&Request.Form("txtEquipment_Name")&"' "
strSQL2 = strSQL2&" where (IP= '"&Request.QueryString("CusID1")&"') "
Set objExec2 = Conn.Execute(strSQL2)
If Err.Number = 0 Then
Response.write("Save Done.")
Else
Response.write("Error Save ["&strSQL&"] ("&Err.Description&")")
End IF
Conn.Close()
Set objExec = Nothing
Set Conn = Nothing
%>
</body>
</html>
Tag : ASP
|
|
 |
 |
 |
 |
Date :
2013-05-15 10:27:44 |
By :
solskjaer16 |
View :
1233 |
Reply :
5 |
|
 |
 |
 |
 |
|
|
|
 |