ODBC 驱动程序管理器未发现数据源名称并且未指定默认驱动程序

我是2003系统。IIS6.0,用的DW+AEECSS做的login.asp.在本地测试都没问题,login都可以添加数据到数据库,打开也一点问题没有。就是上传空间后就出现这样的问题。

系统DSN,文件DSN都是装好驱动,主要问题是路径我不知道怎么设置,是虚拟路径?但是代码是什么。还有DW里的自定义连接字符串可以连到空间不?我login的代码大家看下应该怎么设置数据库路径。<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/conn.asp" -->

<%
' *** Edit Operations: declare variables

Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd

Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId

Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i

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
MM_abortEdit = false

' query string to execute
MM_editQuery = ""
%>
<%
' *** Insert Record: set variables

If (CStr(Request("MM_insert")) = "form1") Then

MM_editConnection = MM_conn_STRING
MM_editTable = "text1"
MM_editRedirectUrl = ""
MM_fieldsStr = "zhanghao|value|mima|value|dengji|value|fuwuqi|value"
MM_columnsStr = "zhanghao|',none,''|mima|',none,''|dengji|',none,''|fuwuqi|',none,''"

' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|")
MM_columns = Split(MM_columnsStr, "|")

' set the form values
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i)))
Next

' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If

End If
%>
<%
' *** Insert Record: construct a sql insert statement and execute it

Dim MM_tableValues
Dim MM_dbValues

If (CStr(Request("MM_insert")) <> "") Then

' create the sql insert statement
MM_tableValues = ""
MM_dbValues = ""
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_formVal = MM_fields(MM_i+1)
MM_typeArray = Split(MM_columns(MM_i+1),",")
MM_delim = MM_typeArray(0)
If (MM_delim = "none") Then MM_delim = ""
MM_altVal = MM_typeArray(1)
If (MM_altVal = "none") Then MM_altVal = ""
MM_emptyVal = MM_typeArray(2)
If (MM_emptyVal = "none") Then MM_emptyVal = ""
If (MM_formVal = "") Then
MM_formVal = MM_emptyVal
Else
If (MM_altVal <> "") Then

1.数据源没有配置好,重新配置一下,看看用户DSN里有没有你的数据源。

2.如果你用的是ASA数据库的话,看看有没有安装

3.PB连接数据源是否连接正确

4.你连的数据源与应用对象中事务对象连的数据源可能不一致。
或者是ASA的版本不一致

如果对您有帮助,请记得采纳为满意答案,谢谢!祝您生活愉快!

vaela
温馨提示:答案为网友推荐,仅供参考
第1个回答  2010-10-09
系统DSN,文件DSN都不需要虚拟路径,直接使用DSN名称的;关键是你上传的空间是不是也有设置相同的DSN给你用。
相似回答