?
Solved

Combination of BDE/Interbase won't accept UPPER in sql statements

Posted on 2003-03-05
10
Medium Priority
?
481 Views
Last Modified: 2013-11-23
Why is this?

This is my query, resulting from a general function :

select *
from customer
where (ID = 1)
 and (upper(enabled) = upper ('T'))

This works with BDE/paradox, and with the interbase ISQL, but not with BDE/interbase.

When using Delphi, the error message is :
'Capability not supported'.

Are there some params I can change in my BDE alias, or any other solution to this?

regards,
classmate
0
Comment
Question by:classmate
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 8073570
hmm,

works for me

how is your alias configured?
(specially the sqlquerymode-property)

meikl ;-)
0
 
LVL 2

Author Comment

by:classmate
ID: 8073713
Originally SQLQueryMode was blank, but i've also tried the 'server' option without any result.
The SQL Passthru Mode was originally Shared Autocommit, but i also have tested Not Shared.
Some other params:
COMMIT RETAIN=FALSE
LANGDRIVER=  (blank)
WAIT ON LOCKS=FALSE
ENABLE SCHEMA CACHE=FALSE

It seems like the query actually executes and finishes, before the BDE does a test afterwards that results in an error.

I've tried the query through database desktop and paradox 9, and both places the SQL hourglass is visible for a while, and then an error appears (The message is somewhat different than the one delphi gives).

If i remove upper(), everything goes fine.
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 8073744
if there are any NULL-Values in the field enabled?

if so, then try

select *
from customer
where (ID = 1)
and enabled is not null
and (upper(enabled) = upper ('T'))

if this all not works then use

select *
from customer
where (ID = 1)
and enabled is not null
and (enabled = 'T' or enabled = 't')


meikl ;-)

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Author Comment

by:classmate
ID: 8074412
"is not null" gives a result in database desktop, but the error message is still displayed.
The second solution will not be overall useful because in many cases, the field tested on will contain any number of characters.

(Between the lines: I am migrating a project from paradox to interbase...)

Seems like i need to create a completely unnessecary workaround (as usual :-( )

thanks
classmate
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 8074829
well,

don't know where the problem is,
because it works fine for me (see first comment)

maybe we're working on different versions

i use
interbase 5.5
bde 5.01
delphi 5

meikl ;-)
0
 
LVL 1

Expert Comment

by:vogonPoet
ID: 8077457

Whenever an simple select statement doesn't work, and the BDE is involved think:

"Request Live"
( make sure that property is set to false on the query component. )


In SQL Exploder ( make that Explorer )
uncheck "OPTIONS | QUERIES.... | Request Live Queries"

Generally, this comes when IB is using some "exotic" sql ( like your example ) that prevents it from returning an editable result set. JOINS and STORED PROCEDURE selects are typical culprits.

If you REALLY need to edit the records that this query returns, one thought that comes to mind is a master-detail setup using the master to do the "UPPER" filtering, and the detail on a primary key to allow for editting.
0
 
LVL 2

Author Comment

by:classmate
ID: 8079147
Meikl:
You are right, we are working on different versions

vogonPoet:
Actually my TQuery is generated by code and not in the visual design environment. It always corresponds with a TTable which is used for updates, so the requestlive property is not even an issue. However i will check it out in case the default value is not False as i believe it is.

The database desktop as far as i know, never gives live results, but it still gives the error.

In general it seems useful to compare theese issues, but i havent found a solution to my problem.

thanks
classmate
0
 

Expert Comment

by:CleanupPing
ID: 9316924
classmate:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 5

Expert Comment

by:snehanshu
ID: 10044595
Hi!
No comment has been added lately and this question is therefore classified abandoned.

If asker wishes to close the question, then refer to
http://www.experts-exchange.com/help/closing.jsp

Otherwise, I will leave a recommendation in the Cleanup topic area that this question is:

PAQ'd and pts refunded

Please leave any comments here within the next seven days. It is assumed that any participant not responding to this request is no longer interested in its final disposition.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

...Snehanshu
EE Cleanup Volunteer
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 10113824
PAQed, with points refunded (150)

modulo
Community Support Moderator
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses
Course of the Month8 days, 20 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question