Odd result from MySQL 3.23.58 ODBC 3.51
Paul Crowley <[email protected]> Mon, 23 Apr 2012 15:50:34 -0700
| Newsgroups | gmane.comp.db.mysql.odbc |
|---|---|
| Message-ID | <[email protected]> |
--_004_14F8086704C26849B8DC168D1AD6BF92D30C94A1PERIDOTcdrprodl_ Content-Type: multipart/alternative; boundary="_000_14F8086704C26849B8DC168D1AD6BF92D30C94A1PERIDOTcdrprodl_" --_000_14F8086704C26849B8DC168D1AD6BF92D30C94A1PERIDOTcdrprodl_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I am trying to connect to an admittedly pretty old MySQL engine running on = Linux. The application is hosted on Windows. Turning the trace on shows: ENTER SQLExecDirectW HSTMT 0x001957B0 WCHAR * 0x00CC8A08 [ -3] "select Customers.ID,Purchases.Or= derDate,Customers.Name,Customers.Company,Customers.State,Customers.Country = from Customers,Purchases where Customers.ID=3DPurchases.CustomerID LIMIT 25= 0;\ 0" SDWORD -3 EXIT SQLExecDirectW with return code -1 (SQL_ERROR) HSTMT 0x001957B0 WCHAR * 0x00CC8A08 [ -3] "select Customers.ID,Purchases.Or= derDate,Customers.Name,Customers.Company,Customers.State,Customers.Country = from Customers,Purchases where Customers.ID=3DPurchases.CustomerID LIMIT 25= 0;\ 0" SDWORD -3 EXIT SQLGetDiagRecW with return code 100 (SQL_NO_DATA_FOUND) SQLSMALLINT 3 <SQL_HANDLE_STMT> SQLHANDLE 0x001957B0 SQLSMALLINT 1 SQLWCHAR * 0x003EE894 SQLINTEGER * 0x003EE888 SQLWCHAR * 0x003EE23C SQLSMALLINT 801 SQLSMALLINT * 0x003EE230 So, there is no error information available just the -1 return code from th= e SQLExecDirectW function. I tried using SQLError instead of SQLGetDiagRec= W and there was no difference in the result. I have taken this same select statement and run it through MySQL Front and = the mysql command on Linux and both produce 250 rows of output, just as exp= ected. I am at a bit of a loss here - I do not know what the error is and = I don't know how to find out more about what the error might be. The binar= y log on the server shows nothing but it is apparently not logging select s= tatements. I am sure it is something that I am doing in ODBC with this, but other sele= ct statements are working fine. Any suggestions? ________________________________ Paul Crowley 480-963-2390 / www.infinadyne.com [cid:[email protected]] --_000_14F8086704C26849B8DC168D1AD6BF92D30C94A1PERIDOTcdrprodl_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr= osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:= //www.w3.org/TR/REC-html40"><head><meta http-equiv=3DContent-Type content= =3D"text/html; charset=3Dus-ascii"><meta name=3DGenerator content=3D"Micros= oft Word 14 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#def= ault#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style><![endif]--><style><!-- /* Font Definitions */ @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} @font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D;} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:purple; text-decoration:underline;} p.MsoAcetate, li.MsoAcetate, div.MsoAcetate {mso-style-priority:99; mso-style-link:"Balloon Text Char"; margin:0in; margin-bottom:.0001pt; font-size:8.0pt; font-family:"Tahoma","sans-serif"; color:#1F497D;} span.EmailStyle17 {mso-style-type:personal-compose; font-family:"Calibri","sans-serif"; color:windowtext;} span.BalloonTextChar {mso-style-name:"Balloon Text Char"; mso-style-priority:99; mso-style-link:"Balloon Text"; font-family:"Tahoma","sans-serif"; color:#1F497D;} .MsoChpDefault {mso-style-type:export-only; font-family:"Calibri","sans-serif";} @page WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in;} div.WordSection1 {page:WordSection1;} --></style><!--[if gte mso 9]><xml> <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext=3D"edit"> <o:idmap v:ext=3D"edit" data=3D"1" /> </o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue vli= nk=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal><span style=3D'c= olor:windowtext'>I am trying to connect to an admittedly pretty old MySQL e= ngine running on Linux. The application is hosted on Windows.<o:p></o= :p></span></p><p class=3DMsoNormal><span style=3D'color:windowtext'><o:p>&n= bsp;</o:p></span></p><p class=3DMsoNormal><span style=3D'color:windowtext'>= Turning the trace on shows:<o:p></o:p></span></p><p class=3DMsoNormal><span= style=3D'color:windowtext'><o:p> </o:p></span></p><p class=3DMsoNorma= l><span style=3D'color:windowtext'>ENTER SQLExecDirectW <o:p></o:p></span><= /p><p class=3DMsoNormal><span style=3D'color:windowtext'>HSTMT &= nbsp; 0x0= 01957B0<o:p></o:p></span></p><p class=3DMsoNormal><span style=3D'color:wind= owtext'>WCHAR * = 0x00CC8A08 [ -3] "select Cu= stomers.ID,Purchases.OrderDate,Customers.Name,Customers.Company,Customers.S= tate,Customers.Country from Customers,Purchases where Customers.ID=3DPurcha= ses.CustomerID LIMIT 250;\ 0"<o:p></o:p></span></p><p class=3DMsoNorma= l><span style=3D'color:windowtext'>SDWORD &nbs= p; &= nbsp; -3<o:p></o:p></span></p><p class=3DMsoNormal><span style=3D'color:win= dowtext'><o:p> </o:p></span></p><p class=3DMsoNormal><span style=3D'co= lor:windowtext'><o:p> </o:p></span></p><p class=3DMsoNormal><span styl= e=3D'color:windowtext'>EXIT SQLExecDirectW with return code -1 = (SQL_ERROR)<o:p></o:p></span></p><p class=3DMsoNormal><span style=3D'color:= windowtext'>HSTMT &nbs= p; 0x001957B0<o:p></o:p></span></p><p class=3DMsoNo= rmal><span style=3D'color:windowtext'>WCHAR * = 0x00CC8A08 [ &n= bsp; -3] "select Customers.ID,Purchases.OrderDate,Customers.Name= ,Customers.Company,Customers.State,Customers.Country from Customers,Purchas= es where Customers.ID=3DPurchases.CustomerID LIMIT 250;\ 0"<o:p></o:p>= </span></p><p class=3DMsoNormal><span style=3D'color:windowtext'>SDWORD&nbs= p; &= nbsp; -3<o:p></o:p></span></p><p class=3DMsoN= ormal><span style=3D'color:windowtext'><o:p> </o:p></span></p><p class= =3DMsoNormal><span style=3D'color:windowtext'><o:p> </o:p></span></p><= p class=3DMsoNormal><span style=3D'color:windowtext'>EXIT SQLGetDiagR= ecW with return code 100 (SQL_NO_DATA_FOUND)<o:p></o:p></span></p><p = class=3DMsoNormal><span style=3D'color:windowtext'>SQLSMALLINT &= nbsp; &nbs= p; 3 <SQL_HANDLE_STMT><o:p></o:p></span></p><p class=3DMs= oNormal><span style=3D'color:windowtext'>SQLHANDLE &= nbsp; 0x001957B0<o:p></o:p></span></p><p clas= s=3DMsoNormal><span style=3D'color:windowtext'>SQLSMALLINT  = ; &n= bsp; 1 <o:p></o:p></span></p><p class=3DMsoNormal><span style=3D'colo= r:windowtext'>SQLWCHAR * &nb= sp; 0x003EE894<o:p></o:p></span></p><p class=3DMsoNormal><span style=3D'col= or:windowtext'>SQLINTEGER * 0x003= EE888<o:p></o:p></span></p><p class=3DMsoNormal><span style=3D'color:window= text'>SQLWCHAR * 0x00= 3EE23C <o:p></o:p></span></p><p class=3DMsoNormal><span style=3D'color:wind= owtext'>SQLSMALLINT &n= bsp; 801 <o:p></o:p></span></p><p class=3DMso= Normal><span style=3D'color:windowtext'>SQLSMALLINT * &nbs= p; 0x003EE230<o:p></o:p></span></p><p class=3DMsoNormal><span s= tyle=3D'color:windowtext'><o:p> </o:p></span></p><p class=3DMsoNormal>= <span style=3D'color:windowtext'>So, there is no error information availabl= e just the -1 return code from the SQLExecDirectW function. I tried u= sing SQLError instead of SQLGetDiagRecW and there was no difference in the = result.<o:p></o:p></span></p><p class=3DMsoNormal><span style=3D'color:wind= owtext'><o:p> </o:p></span></p><p class=3DMsoNormal><span style=3D'col= or:windowtext'>I have taken this same select statement and run it through M= ySQL Front and the mysql command on Linux and both produce 250 rows of outp= ut, just as expected. I am at a bit of a loss here – I do not k= now what the error is and I don’t know how to find out more about wha= t the error might be. The binary log on the server shows nothing but = it is apparently not logging select statements.<o:p></o:p></span></p><p cla= ss=3DMsoNormal><span style=3D'color:windowtext'><o:p> </o:p></span></p= ><p class=3DMsoNormal><span style=3D'color:windowtext'>I am sure it is some= thing that I am doing in ODBC with this, but other select statements are wo= rking fine. Any suggestions?<o:p></o:p></span></p><p class=3DMsoNorma= l><span style=3D'color:windowtext'><o:p> </o:p></span></p><div class= =3DMsoNormal align=3Dcenter style=3D'text-align:center'><span style=3D'font= -size:12.0pt;font-family:"Times New Roman","serif";color:windowtext'><hr si= ze=3D2 width=3D"100%" align=3Dcenter></span></div><p class=3DMsoNormal><spa= n style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:windowte= xt'>Paul Crowley<br>480-963-2390 / www.infinadyne.com<o:p></o:p></span></p>= <p class=3DMsoNormal><span style=3D'font-size:12.0pt;font-family:"Times New= Roman","serif";color:windowtext'><img width=3D168 height=3D48 id=3D"Pictur= e_x0020_2" src=3D"cid:[email protected]" alt=3D"Description: I= nfinaDyne3"></span><span style=3D'color:windowtext'><o:p></o:p></span></p><= p class=3DMsoNormal><o:p> </o:p></p></div></body></html>= --_000_14F8086704C26849B8DC168D1AD6BF92D30C94A1PERIDOTcdrprodl_-- --_004_14F8086704C26849B8DC168D1AD6BF92D30C94A1PERIDOTcdrprodl_--