Solved

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

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Loading csv or delimited data files to MySQL database is a very common task frequently questioned about and almost every time LOAD DATA INFILE comes to the rescue. Here we will try to understand some of the very common scenarios for loading data …
Creating and Managing Databases with phpMyAdmin in cPanel.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

707 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

12 Experts available now in Live!

Get 1:1 Help Now