|
目前我面對到這樣的問題但我不知如何去解決。求各位高手版幫幫忙啦
我的問題是那些號碼不能save 進database。
我的Coding如以下:
<%
dim qty1,qty2,total1,total2,total,chequeno,subop,collectdate,num
dim proname,gram1,gram2,size1,size2,brand1,brand2,dat,sql1,sql2
response.buffer=true
session.lcid=1033
total1=(qty* cint("10"))
total2=(qty2* cint("20"))
total= (total1 + total2)
dat=session("dat")
cusid=session("cusid")
proname=("WoodFree")
gram1=("70G")
gram2=("80G")
size1=("31x43")
size2=("25x35.5")
brand1=("SFI(Sabah)")
brand2=("IK(Indonesia)")
price1=cint("10")
price2=cint("20")
num=cint("0")
Function SafeSQL( _
ByVal strToRenderSafe _
)
SafeSQL = Replace(strToRenderSafe, "'", "''")
End Function
qty=cint(request.form("qty1"))
qty=SafeSQL(qty)
qty2=Cint(request.form("qty2"))
if request.form("cheque")="" then
chequeno = cint("0")
else
chequeno=cint(request.form("cheque"))
end if
if request.querystring("add")= "true" then
'collectdate=request.form("dateNo")
set conn = server.createobject("ADODB.Connection")
conn.open "Provider = Microsoft.Jet.OLEDB.4.0; Data Source = "& Server.mappath("data/ON9.mdb") &";"
sql1 = "insert into ProductPromotion(CustomerID,ProductName,Grammage,Price,Brand,Quantity,TransactionDate,PromotionTotalPrice,Chequeno,CollectionDate) values ('"&cusid&"', '"&proname&"','"&gram1&"','"&price1&"','"&brand1&"',"&qty1&",'"&dat&"','"&chequeno&"','"&comfirmDate&"','"&collectdate&"')"
set RS = conn.Execute(sql1)
end if
%>
我查了好多次多不知道爲什麽那些quantity不能save in ms Access but it save the value in the field with default such as zero |
|