Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
 
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
cannot connect to the db via an ASP page

Posted by etc (etc), 6 June 2003
I have downloaded MySQL ODBC's driver Version 3.51
I have a mySQL db setup, which can be connected to through IIS (testing the data source through a DSN).  I can also connect to the db through SQLyog (GUI interface for the mySQL db).

However, I cannot connect to the db via an ASP page.  I've tried numerous connection strings, along with trying to connect with a DSN - all unsuccessfully.

The ASP pages reside on a Win2k box and the db is on a linux box.  The fact that I can connect to it shows that I *should* be able to hit the db from within the ASP page.  Any help would be appreciated.


Posted by admin (Graham Ellis), 7 June 2003
Looks like it may be more of an ASP rather than MySQL problem, and ASP isn't quite one of my "things".  However - do post up some of the connect strings for the various ways of connecting (changing any passwords of course) and I'll have a look and see if I can suggest anything

Posted by etc (etc), 9 June 2003
these are some of the connect strings we have tried.

'this is the simplest way to make the connection and it *should* work
rather easily
'adoConn.Open "DSN=employees.frm.dsn"

' from damian
'adoConn.Open "driver={mysql};
database=company_phone_listing;server=192.168.1.3;uid=xx;pwd=xx;option=1
6386;"

' oledb provider for mySQL
'adoConn.Open "Provider=MySQLProv;" & _
'           "Data Source=company_phone_listing;" & _
'           "User Id=xx;" & _
'           "Password=xx"

' from able consulting
'adoConn.Open "Driver={mySQL};" & _
'           "Server=192.168.1.3;" & _
'           "Port=3306;" & _
'           "Option=131072;" & _
'           "Stmt=;" & _
'           "Database=company_phone_listing;" & _
'           "Uid=xx;" & _
'           "Pwd=xx"
             
' from connectionstrings.com
'adoConn.Open
"Driver={mySQL};Server=192.168.1.3;Port=3306;Option=131072;Stmt=atabas
e=company_phone_listing;Uid=xx;Pwd=xx;"


Posted by admin (Graham Ellis), 10 June 2003
Hmm.   Have you tried looking at error statuses returned / messages to see what the ASP thinks has gone wrong?

A silly thought - are you running the MySQL GUI on the same computer that's running IIS?   MySQL authorises users from a specific host (it's not *just* name and passowrd login), and one of the very common connection errors is where a MySQL login is set up for only localhost ... works fine in testing, fails as soon as someone tries to connect with a remote client.



This page is a thread posted to the opentalk forum at www.opentalk.org.uk and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2024: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho