צפיות
תשובות
יש לי שגיאה….
Microsoft JET Database Engine error '80040e14'
The INSERT INTO statement contains the following unknown field name: 'Question'. Make sure you have typed the name correctly, and try the operation again.
/noimanshai/poll/Padd.asp, line 20
והקוד
<% Dim Conn, rs, SQL
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("PollDb.mdb")
Set rs = Server.CreateObject("ADODB.RecordSet")
Dim Status,Question,newID,ans
Status = Request.Form("Online")
If Status="" Then Status=0
If Status=1 Then
conn.Execute "UPDATE pl_Question SET Status=2 WHERE Status=1"
End If
dim sql
Question= Replace(Request.Form("Question"),"'",""")
sql = "INSERT INTO pl_Question (Question,Status) VALUES ('"
sql = sql & Question & "'," & Status & ")"
conn.Execute sql
rs.Open "SELECT MAX(ID) as newID FROM pl_Question",conn
newID=rs("newID")
rs.Close
5 תשובות
מישהו יכול להסביר לי
Microsoft JET Database Engine error '80040e14'
The INSERT INTO statement contains the following unknown field name: 'Question'. Make sure you have typed the name correctly, and try the operation again.
/noimanshai/poll/PostPoll.asp, line 17
לא יעזור לך גם אם תשים…
עוד 1000 הודעות. זה רק יעצבן אנשים ולא יעזרו לך.
תמתין בסבלנות ובסוף מישהו שידע מה זה יאמר לך.
אני חושב… ולפעם הבאה, אל תציף ככה
הקוד: XD
<% Dim Conn, rs, SQL
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("PollDb.mdb")
Set rs = Server.CreateObject("ADODB.RecordSet")
Dim Status,Question,newID,ans
Status = Request.Form("Online")
If Status="" Then Status=0
If Status=1 Then
conn.Execute "UPDATE pl_Question SET Status=2 WHERE Status=1"
End If
dim sql
Question= Replace(Request.Form("Question"),"'",""")
sql = "INSERT INTO pl_Question (Question,Status) VALUES ("
sql = sql '"& Question & "','" & Status & "')"
conn.Execute sql
rs.Open "SELECT MAX(ID) as newID FROM pl_Question",conn
newID=rs("newID")
rs.Close
ובנוסף,
יש מאמר במדור ASP על איך לדבג SQL…
מומלץ בחום (ולא רק בגלל שאני כתבתי אותו)