Solved

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

Posted on 2002-03-18
4
862 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
[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
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 200 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

623 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