會員 ![]() | 【求助】用網頁寫入Access! 作業系統為XP,OFFICE2000 +OFFICE 2003並存 小弟想要使用Frontpage 製作一個表單的 ASP 網頁, 再利用 Access 建立一個資料庫, 可是總會遇到下面的情況! 個人認為是『權限不足』, 已經可以開的全開了! 請教高手該如何處置? <% ' FP_ASP Frontpage 元件自動產生 ASP。請勿編輯。 On Error Resume Next strErrorUrl = "" If Request.ServerVariables("REQUEST_METHOD") = "POST" Then If Request.Form("VTI-GROUP") = "0" Then Err.Clear Set fp_conn = Server.CreateObject("ADODB.Connection") FP_DumpError strErrorUrl, "無法建立連線" Set fp_rs = Server.CreateObject("ADODB.Recordset") FP_DumpError strErrorUrl, "無法建立記錄項" fp_conn.Open Application("new_page_1_ConnectionString") FP_DumpError strErrorUrl, "無法開啟資料庫" fp_rs.Open "結果", fp_conn, 1, 3, 2 ' adOpenKeySet, adLockOptimistic, adCmdTable FP_DumpError strErrorUrl, "無法開啟記錄項" fp_rs.AddNew FP_DumpError strErrorUrl, "無法新增新的記錄項到資料庫" Dim arFormFields0(1) Dim arFormDBFields0(1) Dim arFormValues0(1) arFormFields0(0) = "T1" arFormDBFields0(0) = "T1" arFormValues0(0) = Request("T1") FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0 If Request.ServerVariables("REMOTE_HOST") <> "" Then FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_HOST"), "遠端電腦名稱" End If If Request.ServerVariables("HTTP_USER_AGENT") <> "" Then FP_SaveFieldToDB fp_rs, Request.ServerVariables("HTTP_USER_AGENT"), "瀏覽器類型" End If FP_SaveFieldToDB fp_rs, Now, "時間戳記" If Request.ServerVariables("REMOTE_USER") <> "" Then FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_USER"), "使用者名稱" End If fp_rs.Update FP_DumpError strErrorUrl, "無法更新資料庫" fp_rs.Close fp_conn.Close FP_FormConfirmation "text/html; charset=big5",_ "表單確認",_ "感謝您提交下列資訊:",_ "new_page_1.asp",_ "回到表單" End If End If %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=big5"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title>新網頁1</title> </head> <body> <form method="POST" action="new_page_1.asp" webbot-action="--WEBBOT-SELF--"> <!--webbot bot="SaveDatabase" SuggestedExt="asp" S-DataConnection="new_page_1" S-RecordSource="結果" U-Database-URL="fpdb/new_page_1.mdb" S-Builtin-Fields="REMOTE_HOST HTTP_USER_AGENT Timestamp REMOTE_USER" S-Builtin-DBFields="遠端電腦名稱 瀏覽器類型 時間戳記 使用者名稱" S-Form-Fields="T1" S-Form-DBFields="T1" startspan U-ASP-Include-Url="_fpclass/fpdbform.inc" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--#include file="_fpclass/fpdbform.inc"--><!--webbot bot="SaveDatabase" endspan i-checksum="40548" --> <p> </p> <p><input type="text" name="T1" size="20"></p> <p><input type="submit" value="提交" name="B1"><input type="reset" value="重新設定" name="B2"></p> </form> </body> </html> |
回覆 |
會員 ![]() | 在這堸Q論這個問題似乎有點兒不適合(未必有人會懂然後解答您)... 給您一個網址希望那個論壇的人可以幫幫您 http://vb.infoserv.com.tw/ 另外不知道您是否喜歡玩VB的呢?(聽在下之言應該對 Recordset很是了解耶,能夠跟Access連線的人) 其實不一定要用ASP才可以連入Access,用VB(Visual Basic)也行耶 因為ASP始終也是利用VB Script而做的....開發資源遠低於VB... 故有問題比較難解決耶... |
回覆 |
會員 ![]() | 感謝您熱心的幫我, 我這就去看! VB和ASP以前有摸過一陣子, 現在純粹只是為了寫作業用。 |
回覆 |
|
XML | RSS 2.0 | RSS |
本論壇所有文章僅代表留言者個人意見,並不代表本站之立場,討論區以「即時留言」方式運作,故無法完全監察所有即時留言,若您發現文章可能有異議,請 email :[email protected] 處理。