Subject RE: [IBO] Please Help !!!
Author John Tomaselli
Christian,
Having gone through this myself, the advice given is right-on you must
re-think how your app works. The following is to help you create case
insensitive fields.
1) Create a new field on the table for the Column you need to search. ie
NAME_UP for Existing Column of Name
2)Create the Following Triggers:
create trigger tr_upcase_name for ORG active before insert position 0
as
begin
new.name_up=upper(new.name);
end

========
create trigger bu_upcase_name for ORG active before update position 0
as
begin
new.name_up=upper(new.name);
end

3) Search on New Column Name_UP.
HTH
John



-----Original Message-----
From: Christian Kaas [mailto:christian@...]
Sent: Tuesday, January 02, 2001 10:39 AM
To: IBObjects@egroups.com
Subject: AW: [IBO] Please Help !!!



> -----Ursprungliche Nachricht-----
> Von: Chris Landowski [mailto:chrisl@...]
> Gesendet: Dienstag, 2. Januar 2001 16:18
> An: IBObjects@...
> Betreff: [IBO] Please Help !!!
>
>
> I have been struggling for the past couple of months
> attempting to convert an existing BDE/Paradox based app over
> to IBO/InterBase, and have run into a major road block that
> hopefully someone can shed some light on.
>
Haven't you posted this before!? ;-)
>
> My problem is this, Almost every major form in the app
> contains shortcut keys and toolbar buttons for first,
> previous, next and last record (Similar to a navigator
> control). The user also has the ability to jump directly to a
> record based on an entered key field value.
>
> Using the BDE & Paradox with TTable components, this feature
> was fairly easy to implement, consumed very little memory and
> was lightning fast. Using IBO & InterBase I cannot seem to
> achieve the same effect.
Nope - the BIG diff between REAL client server and Desktop DBs

Rule 1: Use TIB_Query/TIBOQuery Objects

Rule 2: Avoid the locate method, unless you're sure the overall result
of a query is relatively small (~100-200 records) and already prefetched

You will have to change your interface in that way that your Forms never
come up with a dataset containing all rows but instead with a SELECTion
of what the user probably wants.
No one need 200000 records in view...
Instead let your programm remember the last search criteria per user and
redisplay the last result/query if the user reenters a form.
If the user wishes to change the criteria let him push a button and
adapt the WHERE clause of your query or even better let IBO or Infopower
controls do this job...

> I am assuming that a scrollable dataset is required for these
> features, so I use a TIBOQuery. However performing a Last or
> Locate ends up buffering the key data for the entire table.
> The tables are fairly large and this process end up
> exhausting all the clients memory and causes an enormous
> amount of network traffic.
>
And that is what Paradox does as well..., but on a file based level
(read full index). but if you use a SQL Server like this (wether it is
Interbase, Oracle or anything else) you end up using it like a filebased
DB only with a lot worse performance :-(
This is not the way one has to use a SQL RDBMS.
what SQL Servers can do best is get more or less complex SQL statement
using one or more tables and return the result very fast.

> Please tell me there is some way to scroll around a dataset
> without having to buffer all the key data in the clients
> memory ? My users will have a fit if these features are taken
> away and will most likely reject the upgrade in favor of the
> old BDE/Paradox version.
>

> Also, is there any way in IB to create a case insensitive
> index like in the BDE ?
Store a copy of your data in a field and put a trigger onto the table
pushing an UPPERed version of your field into a hidden DB field.



--
Christian Kaas mailto:christian@...
Client/Server/Internet/Multitier development
http://www.ckaas.de