472,796 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,796 software developers and data experts.

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 4901

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

Similar topics

20
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
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
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
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
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
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
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
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
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
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.