Environment:
Windows XP Home
MySQL 3.23.55
MDAC 2.7
MyOLEDB 3.0
VC++ 6.0

I use MySQL from ADO using MyOLEDB. Everything worked fine so far till I started using SQL joins. My application is pure breeded C++, but for demonstration purposes I rewrote the essential part in VB:

Set cnn = New ADODB.Connection
'
' Open Connection
'
cnn.Provider = "MySqlProv"
cnn.ConnectionString = "test"
cnn.CommandTimeout = 10000
cnn.ConnectionTimeout = 10000
cnn.CursorLocation = adUseServer
cnn.Open
'
' Set recordset variable
Set rs = New ADODB.Recordset
' Open Recordset
rs.CacheSize = 100
rs.Open "SELECT t1.* FROM t1 INNER JOIN t2 ON t1.f1=t2.f1", _
cnn, adOpenStatic, adLockOptimistic, adCmdText
' ...do interesting stuff here...

This simple program fails at the Open statement with error code "Operation aborted". For a test I typed in the same SELECT statement in the MySQL command line and it worked just fine. I also replaced the SELECT statement by a statement without a JOIN clause. This also worked properly.
To see what ADO hands down to MySQL I enabled logging in MySQL. Here is an excerpt of the log file:


030303 15:16:54      18 Connect     [EMAIL PROTECTED] as anonymous on test
                     18 Query       show tables
                     18 Field List  t1
                     18 Query       show keys from t1
                     18 Field List  t2
                     18 Query       show keys from t2
                     18 Query       show tables
                     18 Field List  t1
                     18 Query       show keys from t1
                     18 Field List  t2
                     18 Query       show keys from t2
                     18 Quit
                     19 Connect     [EMAIL PROTECTED] as anonymous on test
                     19 Query       SELECT t1.* FROM t1 INNER JOIN t2 ON t1.f1 = t2.f1

Before I posted this message, I searched the MySQL archives and I found one message back in 2001 that describes exactly the same symptoms. But the former sender didn't receive any responses, no answers.

Is there any known solution to solve this problem? Anything I could try for further testing?

Thanks in advance, any help greatly appreciated

Peter


_________________________________________________________________
MSN Groups & Chat - Freunde finden - leicht gemacht http://groups.msn.com/people/



--------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Reply via email to