看板 Web_Design 關於我們 聯絡資訊
※ 引述《chunhuian (水藍)》之銘言: : Set conn = Server.CreateObject("ADODB.Connection") : conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.Mappath("db.mdb") : conn.open : sql = "select * from applydata where id='"&id&"' or s_id ='"&s_id&"'" 你的id跟s_id是什麼欄位?.? 正常狀況下如果是「自動編號」,會是數字欄位喔... (數字欄位的話,前後不用加單引號。) 另外,寫sql如果是正式用途,要小心一下sql injection, 最好把id跟s_id做一下sql escape (至少把id s_id 變數字串中可能的單引號換成兩個單引號) : set rs = Server.CreateObject("ADODB.Recordset") : rs.open sql, conn, 1,3 : If name=empty or tel=empty or pws=empty or id=empty or s_id=empty then : Response.Write "資料不完整,請返回上頁重新輸入!" : Elseif Not rs.EOF Then ' 重覆id和s_id : Response.Write "使用者名稱或身份證字號重覆,請返回上頁重新輸入!" : else : response.redirect "view.asp" : End If : Response.End : %> -- I am a person, and I am always thinking . Thinking in love , Thinking in life , Thinking in why , Thinking in worth. I can't believe any of what , I am just thinking then thinking , but worst of all , most of mine is thinking not actioning... -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.134.27.68