[SQL ] 請問關於ASP和Access組合的線上報名

看板Database作者 (傑士特菲斯)時間18年前 (2008/03/01 01:51), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
目前想做一個線上報名的網頁 要求很簡單只要可以在網頁上填寫資料 送到Access資料表裡面就好 但是遇到一個問題 就是寫入不了Access資料庫裡 用IIS跑起來 是沒有顯示什麼問題的 但是開.mdb起來看就是一片空白= = 不知道是哪個部分語法錯了 html, asp, sql or伺服器設定哪裡要注意 請問各位先進 要如何解決這個問題 下面是所含的資料(test.html add.asp sign.mdb) test.html ====================================================================== <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "" rel="nofollow">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="" rel="nofollow">http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=big5" /> <title>無標題文件</title> </head> <body> <form name="signform" method="post" action="add.asp"> 姓名:<input type="text" name="nm" /><br /> ID:<input type="text" name="id" /><br /> <input type="submit" name="go" /> </form> </body> </html> ====================================================================== add.asp ====================================================================== <% nm=Request("nm") id=Request("id") openStr ="driver={Microsoft Access Driver (*.mdb)} ;" & "dbq=" & Server.MapPath("sign.mdb") Set cn = Server.CreateObject("ADODB.Connection") cn.Open openStr sql ="INSERT INTO sign ( nm, id ) VALUES ( '" & nm & "','" & id & "')" cn.Close Set cn = Nothing %> ======================================================================= 請問是程式碼中有不完善的 還是關於伺服器的設定 至於sign.mdb我是用Access2007直接建立一個資料表 有什麼要另外設定的嗎? 剛接觸到asp 還不是很了解 請各位幫忙 謝謝了 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.114.201.57
文章代碼(AID): #17o4OmZC (Database)
文章代碼(AID): #17o4OmZC (Database)