Solved

ASP and MySQL Error

Posted on 2015-02-06
5
98 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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 …
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now