By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,978 Members | 1,362 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,978 IT Pros & Developers. It's quick & easy.

select count(*) Problem in PowerBuilder Thru MySQL ODBC 3.51

P: n/a
Hi,
I'm running MySQL 4.0.13, connecting from PowerBuilder 9 using ODCB
Connector 3.51.
I'm facing a problem where whenever I issue a SELECT COUNT(*) statement
from PowerBuilder, I always get SQL syntax error back from MySQL. (Refer
to ODBC Trace I captured below).

metrohouse af8-b94 ENTER SQLExecDirect
HSTMT 014D2360
UCHAR * 0x020A0EA2 [ -3] "select count ( *) from code
\ 0"
SDWORD -3

metrohouse af8-b94 EXIT SQLExecDirect with return code -1
(SQL_ERROR)
HSTMT 014D2360
UCHAR * 0x020A0EA2 [ -3] "select count ( *) from code
\ 0"
SDWORD -3

DIAG [37000] [MySQL][ODBC 3.51 Driver][mysqld-4.0.13-max-nt]You have
an error in your SQL syntax. Check the manual that corresponds to your
MySQL server version for the right syntax to use near '( *) from code'
at line 1 (1064)

metrohouse af8-b94 ENTER SQLErrorW
HENV 014D12A0
HDBC 014D14B0
HSTMT 014D2360
WCHAR * 0x0012E65C (NYI)
SDWORD * 0x0012E6A8
WCHAR * 0x0012E25C
SWORD 512
SWORD * 0x0012E6B0

metrohouse af8-b94 EXIT SQLErrorW with return code 0
(SQL_SUCCESS)
HENV 014D12A0
HDBC 014D14B0
HSTMT 014D2360
WCHAR * 0x0012E65C (NYI)
SDWORD * 0x0012E6A8 (1064)
WCHAR * 0x0012E25C [ 208] "[MySQL][ODBC 3.51
Driver][mysqld-4.0.13-max-nt]You have an error in your SQL syntax.
Check the manual t"
SWORD 512
SWORD * 0x0012E6B0 (208)

The same statement actually working fine whether I ran it using mysql or
sql yog or even using the same ODBC connector thru Microsoft Access.
(Refer to ODBC
Trace below)
MSACCESS fd4-ff4 ENTER SQLExecDirectW
HSTMT 09BB18C8
WCHAR * 0x0B431048 [ -3] "SELECT
COUNT(* ) FROM `code` \ 0"
SDWORD -3

MSACCESS fd4-ff4 EXIT SQLExecDirectW with return code 0
(SQL_SUCCESS)
HSTMT 09BB18C8
WCHAR * 0x0B431048 [ -3] "SELECT
COUNT(* ) FROM `code` \ 0"
SDWORD -3

Anybody have any idea what may cause the error here ???

Thanks a lot.

Regards,
FattShin

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/my***********...ie.nctu.edu.tw

Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.