当前位置: 代码迷 >> JavaScript >> Data source name not found and no default driver specified解决方案
  详细解决方案

Data source name not found and no default driver specified解决方案

热度:708   发布时间:2012-09-08 10:48:07.0
Data source name not found and no default driver specified
用 Dreamweaver CS3 按照书上的步骤做的 ASP 动态网页。是本讲静态网页的书,只是大致提一下动态网页。在本地测试一切正常,传到免费 ASP 空间上之后就提示这个错误。

Microsoft OLE DB Provider for ODBC Drivers error '80004005' 

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified 

/net11115/index.asp, line 5 


出错代码:
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>
<!--#include file="Connections/mb.asp" -->
<%
var Recordset1_cmd = Server.CreateObject ("ADODB.Command");
Recordset1_cmd.ActiveConnection = MM_mb_STRING;
Recordset1_cmd.CommandText = "SELECT * FROM mytable";
Recordset1_cmd.Prepared = true;

var Recordset1 = Recordset1_cmd.Execute();
var Recordset1_numRows = 0;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

把Connections/mb.asp里面的那条 var MM_mb_STRING = "dsn=myodbc;" 粘贴到这个文件里还是不好使。

是在jabry这个网站测试的。

------解决方案--------------------
免费空间不支持数据库操作
  相关解决方案