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

x
?
Solved

INNER JOIN in mySql Ver: 3.23.49a and ODBC ver: 2.50.39

Posted on 2002-03-18
4
Medium Priority
?
872 Views
Last Modified: 2012-06-27
I have problems running an INNER JOIN agains mySql.
Tables involved are:
testtable,
  fields: TesID (int), ImaID (int)
  index : PRIMARY (TesID and ImaID)
images:
  fields: ImaID (int), ImaName (varchar)
  index : PRIMARY (ImaID)


Here is my Select statement and recordset open line:

strSql = "SELECT testtable.TesID, testtable.ImaID, images.ImaName, images.ImaID FROM testtable INNER JOIN images ON testtable.ImaID = Images.ImaID WHERE testtable.TesID = 2"

Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strSql, Conn, 1

Here is the error message:
Microsoft OLE DB Provider for ODBC Drivers error '80040e21'
ODBC driver does not support the requested properties

The error triggers on line 38 which is the rs.Open line.
Have tested the rs.Open with another select and that works fine...

I thought mySql supported INNER JOIN.

So does anyone knows whats wrong in my Select statement?

Erot

0
Comment
Question by:erot
  • 2
4 Comments
 
LVL 6

Expert Comment

by:kotan
ID: 6876251
try this

"SELECT testtable.TesID, testtable.ImaID, images.ImaName, images.ImaID FROM testtable LEFT JOIN images ON images.ImaID = testtable.ImaID WHERE testtable.TesID = 2"
0
 

Author Comment

by:erot
ID: 6876304
Have found what caused the problem...
INNER JOIN works fine..

but replacing Images.ImaID with images.ImaID did the trick

Erot
0
 
LVL 5

Accepted Solution

by:
kelfink earned 800 total points
ID: 6877851
Mysql on UNIX is case sensitive by nature of the fact that the tables are stored and referenced as files on the OS.  On Unix, files are case sensitive.  It's one annoyying aspect of developing with mySQL on NT then transferring to UNIX later.
0
 

Author Comment

by:erot
ID: 6879273
Thanks. I got to the point where I found out that i and not I did the trick, now I know the reason for it as well.

Thanks
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
In this article, we’ll look at how to deploy ProxySQL.
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

877 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