I have a ASP application running on a IIS7 server on Windows Vista Home Premium (developing environment). The application has an ASA file to configure connections to the database:
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnStart
Application("db") = 2
Application("dbconnect") = "Driver={MySQL ODBC 3.51 Driver};Server=localhost;Port=3306;Option=0;Socket=;Stmt=;Uid=root;Pwd=root;CLIENT_MULTI_STATEMENTS=1;Database=appadmin;"
End Sub
</SCRIPT>
Then, requests are handled in asp pages, which first load configuration with the following code:
Session("configid") = 1
dbConnect = Application("dbconnect")
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open (dbConnect)
sql = "select * from settings where configid = "&Session("configid")
Set RS = ExecuteRecordset(sql)
...
Everything seems fine, however, on any request to the site, it logs the following error:
|11|80004005|[Microsoft][ODBC_Driver_Manager]_Data_source_name_not_found_and_no_default_driver_specified 80
Opening a command prompt and running "mysql -uroot -proot -D appadmin" connects to the database without problem.
Any ideas as to what may be causing the problem?