Solved

ASP and MySQL Error

Posted on 2015-02-06
5
108 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 143

Expert Comment

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

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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

635 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