我有一个数据库问题,如果我的 sql 是这样的:
Dim Username
Username = request.form(trim("username"))
Username = Replace(username,"'","''")
Dim email
email = request.form(trim("email"))
email = Replace(email,"'","''")
Dim question
question = request.form(trim("question"))
question = Replace(question,"'","''")
Dim answer
answer = request.form(trim("answer"))
answer = Replace(answer,"'","''")
Dim date_answered
dag = Day(Now())
maand = Month(Now())
jaar = Year(Now())
uur = Hour(Time)
minuten = Minute(Time)
seconden = Second(Time)
datum= jaar & "-" & maand & "-" & dag
tijd = uur & ":" & minuten& ":" & seconden
date_answered = (datum & " " & tijd)
Dim isActive
isActive = "yes"
sql="UPDATE faqtbl SET "
sql=sql & "Name='" & username & "',"
sql=sql & "email='" & email & "',"
sql=sql & "question='" & question & "',"
sql=sql & "answer='" & answer & "',"
sql=sql & "date_answered='" & date_answered & "',"
sql=sql & "isActive='" & isActive & "'"
sql=sql & " WHERE ID='" & lngRecordNo &"';"
on error resume next
在我要添加到数据库中的数据使用双引号之前,完全没有问题。请帮助我如何使用双引号来操作查询?谢谢你.. :)