Bug #4287 ODBC Connector/Win 2000
Submitted: 25 Jun 2004 18:35 Modified: 30 May 2013 6:01
Reporter: Dan C Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S3 (Non-critical)
Version:3.51 OS:Windows (Win 2000)
Assigned to: CPU Architecture:Any

[25 Jun 2004 18:35] Dan C
Description:
I'm not sure what is exactly happening.  But I do think it is a bug.  I have attached the ODBC log to help explain the problem.

If you search this message for SQL_FETCH_NEXT you will see on the next line "ccdat" or "blicen" depeneding on which line your search found.  The "ccdat" and "blicen" are DSN names used to get the ODBC connection info.  This may be the way its supposed to be, however, these are NOT the complete DSN names, which my be causing problems.  The error I get is something like "cannot login to database".  I am using this with Crystal reports and IIS/ASP.

rad8883E        7e0-584	ENTER SQLSetEnvAttr 
		SQLHENV             08241C18
		SQLINTEGER                 200 <SQL_ATTR_ODBC_VERSION>
		SQLPOINTER          0x00000003
		SQLINTEGER                  -6 

rad8883E        7e0-584	EXIT  SQLSetEnvAttr  with return code 0 (SQL_SUCCESS)
		SQLHENV             08241C18
		SQLINTEGER                 200 <SQL_ATTR_ODBC_VERSION>
		SQLPOINTER          0x00000003 (BADMEM)
		SQLINTEGER                  -6 

rad8883E        7e0-584	EXIT  SQLDataSourcesW  with return code 0 (SQL_SUCCESS)
		HENV                08241C18
		UWORD                        1 <SQL_FETCH_NEXT>
		WCHAR *             0x07ACEA60 [      11] "ccdat"
		SWORD                      255 
		SWORD *             0x07ACEA58 (11)
		WCHAR *             0x07ACEC60 [      22] "MySQL ODBC "
		SWORD                      255 
		SWORD *             0x07ACEA5C (22)

rad8883E        7e0-584	ENTER SQLDataSourcesW 
		HENV                08241C18
		UWORD                        1 <SQL_FETCH_NEXT>
		WCHAR *             0x07ACEA60 
		SWORD                      255 
		SWORD *             0x07ACEA58
		WCHAR *             0x07ACEC60 
		SWORD                      255 
		SWORD *             0x07ACEA5C

rad8883E        7e0-584	EXIT  SQLDataSourcesW  with return code 0 (SQL_SUCCESS)
		HENV                08241C18
		UWORD                        1 <SQL_FETCH_NEXT>
		WCHAR *             0x07ACEA60 [      13] "blicen"
		SWORD                      255 
		SWORD *             0x07ACEA58 (13)
		WCHAR *             0x07ACEC60 [      22] "MySQL ODBC "
		SWORD                      255 
		SWORD *             0x07ACEA5C (22)

rad8883E        7e0-584	ENTER SQLConnectW 
		HDBC                08241E90
		WCHAR *             0x0818635C [      -3] "ccdata-isdev\ 0"
		SWORD                       -3 
		WCHAR *             0x1F7B1D38 [      -3] "******\ 0"
		SWORD                       -3 
		WCHAR *             0x1F7B1D38 [      -3] "******\ 0"
		SWORD                       -3 

rad8883E        7e0-584	EXIT  SQLConnectW  with return code -1 (SQL_ERROR)
		HDBC                08241E90
		WCHAR *             0x0818635C [      -3] "ccdata-isdev\ 0"
		SWORD                       -3 
		WCHAR *             0x1F7B1D38 [      -3] "******\ 0"
		SWORD                       -3 
		WCHAR *             0x1F7B1D38 [      -3] "******\ 0"
		SWORD                       -3 

		DIAG [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) 

How to repeat:
This only started occuring after I created multiple ODBC connections, each to separate databases (of course).
[21 Jul 2004 23:20] Timothy Smith
Hi, I need a full test case to repeat this.  I.e., what exactly do you have as DSNs, what exactly do you do in Crystal Reports to attempt the multiple connections.

Thanks,

Timothy
[30 Jul 2004 16:37] Dan C
Thank you for your follow up.

I'm not sure what you need but I'll give you what I know.

MySQL ODBC ver 3.51.06 on a win 2000 Server.
The DSN is setup as a System DSN and Connects to Debian Linux MySQL
Test connection replys "Data Source 'database' Connected Successfully to 'mysqld-4.0.17-log' !!!
The only options checked on the Options/Driver screen are Don’t Optimize Column Width, Return Matching Rows, Allow BIG Results, Don’t Prompt on Connect.

In Crystal Reports ver 8 (not 8.5)  I am joining two tables with the following SQL statement that is automatically generated by Crystal Reports then I remove the curly brackets and the ‘oj’ to keep it from giving a SQL syntax ODBC error.  The report is rather simple.

SELECT
    lic_master1.`ID`, lic_master1.`LIC_NO`, lic_master1.`BUS_TYPE`, lic_master1.`OWNER_NO`,
    owner1.`OWNER_NAME`
FROM
    `blicense`.`lic_master` lic_master1 INNER JOIN `blicense`.`owner` owner1 ON
        lic_master1.`ID` = owner1.`LIC_ID`

I hope this helps, and let me know if you need additional info!

-Dan
[14 Feb 2005 22:54] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[30 May 2013 6:01] Bogdan Degtyariov
Thank you for your bug report. This issue has already been fixed in the latest released version of that product, which you can download at

  http://www.mysql.com/downloads/