|
 |
|
ขอความช่วยเหลือ นิดหนึ่งครับ ... อยากทราบ code ตัดสต๊อกโดยใช้ ฐานข้อมูล asp.net กับ access |
|
 |
|
|
 |
 |
|
ใช้คำสั่ง ASP Microsoft Access Edit/Update Record ฐานข้อมูลน่ะครับ
Code (ASP)
<% Option Explicit %>
<html>
<head>
<title>ThaiCreate.Com ASP & Microsoft Access Tutorial</title>
</head>
<body>
<%
Dim Conn,strSQL,objExec
Set Conn = Server.Createobject("ADODB.Connection")
Conn.Open "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("mydatabase.mdb"),"" , ""
strSQL = "UPDATE customer SET "
strSQL = strSQL&"CustomerID = '"&Request.Form("txtCustomerID")&"' "
strSQL = strSQL&",Name = '"&Request.Form("txtName")&"' "
strSQL = strSQL&",Email = '"&Request.Form("txtEmail")&"' "
strSQL = strSQL&",CountryCode = '"&Request.Form("txtCountryCode")&"' "
strSQL = strSQL&",Budget = '"&Request.Form("txtBudget")&"' "
strSQL = strSQL&",Used = '"&Request.Form("txtUsed")&"' "
strSQL = strSQL&"WHERE CustomerID = '"&Request.QueryString("CusID")&"' "
Set objExec = Conn.Execute(strSQL)
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>
ส่วนคำถามที่ 2 ให้กำหนดความกว้างเป็น pixel ครับ
|
 |
 |
 |
 |
Date :
2010-01-23 18:14:46 |
By :
webmaster |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 05
|