本文介绍了SQL连接错误4160 ASP 3.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我已经使用了这个, < SCRIPT LANGUAGE = VBScript RUNAT = 服务器 > Sub Session_OnStart Session(ConnectionString)= DSN = SQL \ SQLEXPRESS; UID = sa; PWD = sa; DATABASE = DB1; APP = ASP脚本 会话(ConnectionTimeout)= 15 Session(CommandTimeout)= 30 End Sub Sub Session_OnEnd End Sub < / SCRIPT > 看到带下划线的连接字符串 它给出错误 错误消息e ... 未处理的异常('[Microsoft] [ODBC驱动程序管理器]未找到数据源名称且未指定默认驱动程序')发生在W3wp.exe [4160]。 帮助你知道答案 感谢adv。解决方案 这是ODBC连接 检查您是否已将其配置为 - >设置 - >控制面板 - >管理工具 - >数据源(ODBC) 问题解决了... 希望对面临同样问题的人有用 我创建了 DSN ,... open controlpanel - >管理工具 - > ODBC - >系统DSN - > 选择''SQL Server''驱动程序 - >将DSN命名为''SQLDSN'' - > 选择服务器名称/复制粘贴我的sql服务器名称 [问题在服务器名称列表中我的服务器名称不完整,因为在sqlserver中,我从sql连接窗口复制粘贴它) - >输入sql server id-pwd - >选择默认数据库 完成并测试它! 测试连接成功后 in asp ... 我使用连接字符串如下所示 DSN = SQLDSN; uid = ___; pwd = ____; 快乐编码! :) I have use this,<SCRIPT LANGUAGE=VBScript RUNAT=Server> Sub Session_OnStart Session("ConnectionString") = "DSN=SQL\SQLEXPRESS;UID=sa;PWD=sa;DATABASE=DB1;APP=ASP script" Session("ConnectionTimeout") = 15 Session("CommandTimeout") = 30 End Sub Sub Session_OnEnd End Sub </SCRIPT>see underlined connection string it''s giving errorError Message...an unhand-led exception ('[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified') Occurred in W3wp.exe [4160]. help you know answerthanks in adv. 解决方案 This is ODBC connection Check if you have configured it in -> Settings --> Control Panel -> Administrative Tools -> Data Sources(ODBC)Issue is solved...Hope it will be useful to them who are facing same problemI have create DSN,...open controlpanel -> administrative tools -> ODBC -> System DSN -> select ''SQL Server'' Driver -> Name DSN as ''SQLDSN'' -> select servername/ copy paste my sql server name [problem was here in servername list my servername was not full as in sqlserver so, that i copy-paste it from sql connection window)-> enter sql server id-pwd-> select default databasefinish and test it! after test of connection is succeedin asp...I used connection string as below"DSN = SQLDSN; uid=___ ; pwd=____;" Happy Coding!:) 这篇关于SQL连接错误4160 ASP 3.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-27 10:04