Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ASP and MySQL Error

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

Independent Software Vendors: 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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
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…

688 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