?
Solved

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

Posted on 2003-03-05
10
Medium Priority
?
485 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
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month15 days, 10 hours left to enroll

850 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