Solved

ASP and MySQL Error

Posted on 2015-02-06
5
101 Views
Last Modified: 2015-02-06
We have a legacy service in house which still runs on ASP. It currently uses MySQL 4.1.22. Although we intend to upgrade from ASP eventually that is some time away. In the meantime I need to abandon the old MySQL server and move to 5.5.33. However we are hitting problems.

Using the connection string:-

conMySQLTest_STRING = "Driver={MySQL ODBC 5.1 Driver};Server=Hostaddress;Port=3306;Option=16387;Database=DBName;UID=User;pwd=Password;"

Open in new window


.. when I change the credentials and point it to the 5.5.3 server the code fails at the last line of:-

Dim rsManageGroups
Dim rsManageGroups_cmd
Dim rsManageGroups_numRows

Set rsManageGroups_cmd = Server.CreateObject ("ADODB.Command")
rsManageGroups_cmd.ActiveConnection = conMySQLTest_STRING
rsManageGroups_cmd.CommandText = strSQLString
rsManageGroups_cmd.Prepared = true
Set rsManageGroups = rsManageGroups_cmd.Execute

Open in new window


It goes without saying that all works fine and dandy when I re-point the connection string to the old 4.1.22 MySQL server. I have checked that it is not a password/user/host/dbname typo causing it.

Can anyone advise me what I need to change?
0
Comment
Question by:cescentman
  • 2
  • 2
5 Comments
 
LVL 11

Expert Comment

by:Dany Balian
ID: 40593417
Change your current password to anything else and revert back to the old password (if u want).
0
 
LVL 1

Author Comment

by:cescentman
ID: 40593421
Thanks for the prompt reply. However I'm not sure what you are suggesting. As I say above this is definitely not a password issue. Perhaps I misunderstand; What are you suggesting?
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 40593448
>the code fails at the last line
which is the exact error?
0
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 40593450
and what is the value of the strSQLString variable
0
 
LVL 1

Author Closing Comment

by:cescentman
ID: 40593515
Bingo!

Here was I tearing my hair out and hadn't had the common sense to check the SQL. It is actually dynamic in the form:-

SELECT * FROM Hosting.Groups WHERE GroupName NOT LIKE ...

For some reason the 5.5 MySQL server doesn't like the DB.Table form so changing it to:-

SELECT * FROM Groups WHERE GroupName NOT LIKE ...

... got me up and running in seconds. Many Thanks. All I have to contend with now is my feeling of stupidity :)
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question