List:MySQL ODBCNext Message »
From:Tak Chi Chan Date:March 11 1999 3:11am
Subject:Error with PowerBuilder: Unknown column 'xxxx ' in 'field list'
View as plain text  
Hi

I've got problems when using MyODBC with PowerBuilder 5.0.  
Because I have functions in the embedded SQL statement, I check the MyODBC
option 'ignore space after function names'. But when I run the application
where I have the following SQL statement:

select min(card_no) into :ls_card_no from patient using sqlca;

I got the following error:

SQLSTATE = 42S22
[TCX][MyODBC]Unknown column 'card_no ' in 'field list'

Note that there is a white space inserted at the end of the column
'card_no'.  

Then I tried to use the DB Administration Painter with this statement,

select min(card_no) from patient; 

it worked and returned me the correct value.

But then I tried 

select min ( card_no ) from patient;

the same error occurred!

Then I've tried other SQL statement, it seems that whenever a column name
is followed by a white space in the SQL statement, a white space is
inserted at the end of the column name, returning an error of 'Unknown
column 'xxxxx ' in 'field list''.

I used

MySQL 3.22.18a (Win32)
MyODBC 2.50.19
(platfrom Windows 95)

and I also tried MyODBC 2.50.22, MySQL 3.22.16, same problem

I also tried to uncheck the option 'ignore space after function names', All
SQL statements in my program work very well (except they have function
names, surely).  But it seems that it doesn't work in any case if I checked
the option.

Thank you very much

Takchi
Thread
Error with PowerBuilder: Unknown column 'xxxx ' in 'field list'Tak Chi Chan11 Mar
  • Error with PowerBuilder: Unknown column 'xxxx ' in 'field list'Michael Widenius11 Mar