473,511 Members | 16,282 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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
0 4980

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
4777
by: Mr Dygi | last post by:
Hi, PHP 4.3.4 installed manually from package *.zip and Apache 2. I have a problem with this simple code: <?php $link = mysql_connect("127.0.0.1","","") or die("Could not connect: " ....
21
5215
by: John Fabiani | last post by:
Hi, I'm a newbie and I'm attempting to learn howto create a select statement. When I use >>> string1='18 Tadlock Place' >>> cursor.execute("SELECT * FROM mytest where address = %s",string1) All...
2
1972
by: Larry | last post by:
I am trying to connect to my MySQL database using python and ODBC. Here is what I am doing. >>> import dbi,odbc >>> conn=odbc.odbc("dsn=facs") >>> cursor=conn.cursor() >>>...
9
5974
by: atse | last post by:
Hi, My table in the database may contain duplicate records, which means except the primary key (auto_increment) field is unique, all or almost of all the fields are with the same content. How...
4
7876
by: Kong Li | last post by:
Environments: 1. WinXP SP1, MDAC 2.7 SP1 (Microsoft ODBC for Oracle is 2.573.9030.0), Oracle client 9.2.0.1. 2. Win2000 SP4, MDAC 2.7 SP1 (Microsoft ODBC for Oracle is 2.573.9030.0), Oracle...
0
2516
by: Mike Morton | last post by:
Runnint Mysql 3.23.47 I have the following two tables: backorder_notification ->product_code varchar ->email varchar ->date_added date Products ->code varchar ->name varchar
0
1678
by: Mike Chirico | last post by:
I found the following interesting and wanted to pass it along Reference (TIP 12): http://prdownloads.sourceforge.net/souptonuts/README_mysql.txt?download Connect and Select from Java //...
0
1455
by: JB | last post by:
Hey ppl, I'm experiancing a very weird problem with my current Win32(win2k/XP) application. I'm using: * Delphi 7 * ADO * mySQL ODBC 3.51 drivers
0
2003
by: Gerry | last post by:
Hi, I am not quite sure where to place this question, by Powerbuilder or MySQL as I guess it is a communication glitch between the two platforms. I am trying to convert a Powerbuilder...
0
7245
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7144
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7356
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7427
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
4741
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3227
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3214
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1577
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
785
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.