[問題] DW ASPvbscript + Access 資料庫連結失敗

看板Web_Design作者 (理性勿戰代PO^.<)時間14年前 (2011/08/26 18:00), 編輯推噓1(103)
留言4則, 2人參與, 最新討論串1/1
我的網站原始文件打包 RAR 載點(內含 DW ste 網站管理檔): http://www.megaupload.com/?d=30HUZKYZ 解壓前先掃毒 我不想被永久水桶 XD ============================================================================== 我新手(都很認真爬 GOOGLE 文) 最近看DW工具書學 Asp + Access 因為硬碟 FAT32 格式 + 權限問題 為了搞 IIS 本機伺服器就先消耗了好幾天 然後在本機測試 ASP + 資料庫 連繫也耗了很久 今天終於全部都成功了 但上傳到遠端網頁空間(有支援 ASP)測試後 仍連繫失敗 差一步啊 殘念 我網站就兩個檔案而已 + 其它用 DW 連繫資料庫後自己生成的資料及 + 文件 index.asp taobaodata.mdb 進入網頁 index.asp 後即出現以下訊息 Microsoft OLE DB Provider for ODBC Drivers 錯誤 '80004005' [Microsoft][ODBC 驅動程序管理器] 未發現數據源名稱並且未指定默認驅動程序 而我的 index.asp 原始程式碼如下: <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <!--#include file="Connections/taobaodata.asp" --> <% Dim MM_editAction MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME")) If (Request.QueryString <> "") Then MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString) End If ' boolean to abort record edit Dim MM_abortEdit MM_abortEdit = false %> <% If (CStr(Request("MM_insert")) = "form1") Then If (Not MM_abortEdit) Then ' execute the insert Dim MM_editCmd Set MM_editCmd = Server.CreateObject ("ADODB.Command") MM_editCmd.ActiveConnection = MM_taobaodata_STRING MM_editCmd.CommandText = "INSERT INTO [taobao member data] (account, password) VALUES (?, ?)" MM_editCmd.Prepared = true MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 201, 1, -1, Request.Form("rgname")) ' adLongVarChar MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 201, 1, -1, Request.Form("rgpassword")) ' adLongVarChar MM_editCmd.Execute MM_editCmd.ActiveConnection.Close ' append the query string to the redirect URL Dim MM_editRedirectUrl MM_editRedirectUrl = "tw.yahoo.com" If (Request.QueryString <> "") Then If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString Else MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString End If End If Response.Redirect(MM_editRedirectUrl) End If End If %> <% Dim taobaodate Dim taobaodate_cmd Dim taobaodate_numRows Set taobaodate_cmd = Server.CreateObject ("ADODB.Command") taobaodate_cmd.ActiveConnection = MM_taobaodata_STRING taobaodate_cmd.CommandText = "SELECT * FROM [taobao member data]" taobaodate_cmd.Prepared = true Set taobaodate = taobaodate_cmd.Execute taobaodate_numRows = 0 %> <!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=utf-8" /> <title>加入會員</title> </head> <body> <form id="form1" name="form1" method="POST" action="<%=MM_editAction%>"> <p> <label> 會員帳號 <input name="rgname" type="text" id="rgname" size="20" maxlength="20" /> </label> </p> <p> <label> 會員密碼 <input name="rgpassword" type="password" id="rgpassword" size="20" maxlength="20" /> </label> </p> <p> <label> <input type="submit" name="rgbutton" id="rgbutton" value="申請" /> </label> </p> <input type="hidden" name="MM_insert" value="form1" /> </form> </body> </html> <% taobaodate.Close() Set taobaodate = Nothing %> 求高手幫助 感謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.46.37.108

08/26 18:07, , 1F
補充:我正在做的是 基礎版 加入會員系統的申請表單
08/26 18:07, 1F

08/26 18:10, , 2F
於 ASP 訪客填寫註冊資料後 對應資料傳送至資料庫(Access)
08/26 18:10, 2F

08/26 18:11, , 3F
若有好心人幫我改檔的 請寄到 youngayachaekage@gmail.com
08/26 18:11, 3F

08/26 18:33, , 4F
你要不要考慮用asp.net來做啊
08/26 18:33, 4F
文章代碼(AID): #1ELsxH3O (Web_Design)