Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ASP and MySQL Error

Posted on 2015-02-06
5
Medium Priority
?
114 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 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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
Recursive SQL is one of the most fascinating and powerful and yet dangerous feature offered in many modern databases today using a Common Table Expression (CTE) first introduced in the ANSI SQL 99 standard. The first implementations of CTE began ap…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

824 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