Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2003-03-05
10
Medium Priority
?
483 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

636 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