尝试使用经典 asp 连接到 mysql 时出现此错误... Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified 我试过许多不同的事情,我认为问题在于我使用的是 IIS 8。
这是我尝试连接到mysql的方式:
Dim oConn, oRs
Dim qry, connectstr
Dim db_name, db_username, db_userpassword
Dim db_server
db_server = "server"
db_name = "database"
db_username = "uid"
db_userpassword = "pwd"
connectstr = "Driver={MySQL ODBC 3.51 Driver};SERVER=" & db_server & ";DATABASE=" & db_name & ";UID=" & db_username & ";PWD=" & db_userpassword
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open connectstr
response.write("<script language=""javascript"">alert('Connected!');</script>")
我也尝试使用较新的 odbc 5.1 驱动程序,但连接失败。关于我应该尝试什么的任何想法?