Solved

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

Posted on 2002-03-18
4
840 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 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction In this article, I will by showing a nice little trick for MySQL similar to that of my previous EE Article for SQLite (http://www.sqlite.org/), A SQLite Tidbit: Quick Numbers Table Generation (http://www.experts-exchange.com/A_3570.htm…
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…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

920 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now