[firebird-support] Retreiving exception message in PSQL

2013-06-16 Thread sir_wally_lewis
Hi. I call a stored procedure in PSQL like this: BEGIN EXECUTE PROCEDURE MY_PROC WHEN ANY DO BEGIN THEERRMSG = 'GDSCODE ' || CAST( GDSCODE AS VARCHAR(20)); INSERT INTO FAILED_LOG ( TS_SRT, DE_MSG ) VALUES ( CURRE

[firebird-support] Re: Rename database command

2013-06-06 Thread sir_wally_lewis
Hi, Please do not misunderstand me. I already have gone over this ground. I am not a newbie when it comes to firebird. In fact I have worked major miracles in making with firebird to do what it does now. There are no long running transactions. Your assuming my code is the source of the issue,

[firebird-support] Re: Rename database command

2013-06-05 Thread sir_wally_lewis
Hi Sean, While I don't pretend to understand Firebird at the atomic level. I am just trying to cope with database slowdowns. We find the only bullet proof methodology to solve database slowdowns is a backup restore. So we are searching for a method to be able to resolve database slowdowns, whil

[firebird-support] Re: Rename database command

2013-06-04 Thread sir_wally_lewis
Hi Ann, Thanks for your input. A problem with nbackup is transaction counts are not reset. As you know our company builds and works with databases around 800 GB. It became clear to us that to keep the system going we have to run a backup/restore every weekend because of slow downs when transacti

[firebird-support] Re: Rename database command

2013-06-02 Thread sir_wally_lewis
enamed. > You need a better way > Alan > On 01/06/2013 4:22 PM, "sir_wally_lewis" wrote: > > > current practice is. > > > > - backup database > > - restore to new name. > > - rename old database ( can't be done by firebird ) > > -

[firebird-support] Re: Rename database command

2013-05-31 Thread sir_wally_lewis
current practice is. - backup database - restore to new name. - rename old database ( can't be done by firebird ) - rename new name to production name. ( can't be done by firebird ) any step fails process is failed. This allows for 100 percent fool proof backup restore.

[firebird-support] Rename database command

2013-05-30 Thread sir_wally_lewis
There is a DROP DATABASE command. It would make life a lot simpler if I could RENAME a database. DROP DATABASE is too dangerous a command. We can't have it feasible that a client loses it's database RENAME DATABASE new_name.fdb Would resolve the show stopping failure of dropping a database. T

[firebird-support] Re: Timeout occurred while waiting for a secondary connection for event processing

2013-05-26 Thread sir_wally_lewis
OK, Our network guy knew what was happening. We use Firebird Events for our applications to listen to changes in the database. However the port the apps listen to must be set. And the network guy had firewalled all ports except 3050. We needed to update firebird.conf to a specfied port for eve

[firebird-support] Timeout occurred while waiting for a secondary connection for event processing

2013-05-23 Thread sir_wally_lewis
Does anyone know what this means? Simply trying to open a dataset and I get this error just after the system simply stops. Server Version: LI-V6.3.1.26351 Firebird 2.5

[firebird-support] Temporary directories in firebird.conf not being used

2013-05-06 Thread sir_wally_lewis
Hi, I am using Firebird 2.5 on linux ( CentOS 6 ) I have set the firebird.conf temporary directories variable to point to our large data storage folders. However Firebird is determined not to use it and instead uses '/tmp' So I have not been able to run any restore process as firebird runs out o

[firebird-support] Re: compaing NULL values like NEW,COLUMN and OLD.COLUMN in triggers

2012-11-26 Thread sir_wally_lewis
Thanks, just what we were looking for

[firebird-support] compaing NULL values like NEW,COLUMN and OLD.COLUMN in triggers

2012-11-26 Thread sir_wally_lewis
We need to do a lot of checking in update triggers to check for value changes. ie if( OLD.FIELD1 <> NEW.FIELD1 )OR( OLD.FIELD2 <> NEW.FIELD2 )THEN DO SOMETHING; However if either value is NULL then the response will be NULL. Is there an easy way to compare values, taking into account these

[firebird-support] Cannot restore a database because of failed unique key index

2012-10-23 Thread sir_wally_lewis
Hi, We use Firebird 2.5.1 on Linux 64 bit Firebird fails to restore because of a unique constraint( see below ). However when interrogating the data, no duplicate is found. ( see below SQL, unique key is on the grouped by fields ) How can this be? Kind Regards, Robert. SELECT ID_VN, CD_IT

[firebird-support] Re: Writing Carraige returns into a field using SQL

2012-09-03 Thread sir_wally_lewis
Thanks, Brain was faded. Kind Regards, Robert.

[firebird-support] Writing Carraige returns into a field using SQL

2012-09-03 Thread sir_wally_lewis
Hi, I have a problem, where I need to use SQL to update a Memo field. The textual data includes carriage returns. This should be simple however the below fails: UPDATE ST_SCLE_PRNT_FMT SET NA_SCLE_PRNT_FRMT = '[2|02:*]' || #13#10 || 'BARFMTDEFAULT=00' || #13#10 || 'USEDATE=SELLDATE' || #13#10 ||

[firebird-support] Re: Cannot get correct field length when using collation in domain

2012-04-28 Thread sir_wally_lewis
found the answer. there is also a character_length field in the rdb$fields table. Found solution in archives of this group. Kind Regards, Robert.

[firebird-support] Cannot get correct field length when using collation in domain

2012-04-28 Thread sir_wally_lewis
We are now using the feature in Firebird that allows numerical sorting of varchar fields ( see below ) however now the length of these fields in RDB$FIELDS.RDB$FIELD_LENGTH is now 4 times the real size of the field. size 80 when domain length is really only 20. This deceives our application int

[firebird-support] uuidlib uuid_create() crashes firebird

2012-02-12 Thread sir_wally_lewis
Hi, I got the uuidlib UDF library off the IBPheonix website. I installed it into CentOS 6 64 bit operating system by compiling the source. I ensured the UDF has executable permision. Using Firebird 2.5.1 superclassic I declared the function as in example DECLARE EXTERNAL FUNCTION UUID_CREATE

[firebird-support] Re: Firebird 2.5: Optimize of IN or EXISTS performance

2011-11-14 Thread sir_wally_lewis
your table structure does not seem suitable for an exists query. "IN" querys were never ever optimised. Here is proper syntax for EXISTS: SELECT * FROM TABLE1 WHERE( EXISTS ( SELECT * FROM TABLE2 WHERE( TABLE1.KEY1 = TABLE2.KEY1 ) AND( TABLE1.KEY2 = TABLE2.KEY2 ))) ie. there needs to be ma

[firebird-support] Re: Firebird 2.5 crashing after calling UDF

2011-10-25 Thread sir_wally_lewis
Thanks for the fixes to my C library Tomasz and for your help. All my C Library is originally extracted from FreeUDFLibC and I added extra functions. There were errors in the C Code that I was unaware of. Amazing that the same unaltered code works under CenTos 64 bit in 2.1 though. Still do no

[firebird-support] Re: Firebird 2.5 crashing after calling UDF

2011-10-21 Thread sir_wally_lewis
I'll email you directly with the code on monday. Thanks robert.

[firebird-support] Firebird 2.5 crashing after calling UDF

2011-10-20 Thread sir_wally_lewis
Hi, we are trying to get a linux version ( 64 bit ) of firebird 2.5 running. We have tried CentOS 6 and Fedora 15. OS = CentOS 6 kernel 2.6.32-71.29.1.el6.x86_64 #1 SMP Firebird = FirebirdCS-2.5.1.26351-0.amd64.rpm We compile our code in both "C" and "Pascal" ( lazarus ). This is the same "C"

[firebird-support] Re: Firebird database comparison tool.

2011-10-18 Thread sir_wally_lewis
I have been successfully updating PSQL ( stored procedures/triggers/views ) for over 8 years, to thousands of sites and over the internet. As well as updating the applications that go with them. The trick is to use the metadata to store the current version of the particular PSQL element. eg.

[firebird-support] Re: Pascal UDF passing timestamps/strings

2011-10-11 Thread sir_wally_lewis
so these functions look like: procedure fbdatetopascaldate( ib_datetime : PISC_QUAD; VAR pscl_dt : TDATETIME ); var tm_date:Tm; begin init_tm(tm_date); isc_decode_date(ib_datetime,@tm_date); pscl_dt := EncodeDate(tm_date.tmYear + 1900, tm_date.tm_mon + 1, tm_date.tm_mday ) + Enc

[firebird-support] Re: creating a database in ubuntu

2011-10-09 Thread sir_wally_lewis
Thankyou helen, i now have successfully created a blank database in ubuntu. with your information and the information I found in http://www.psychocats.net/ubuntu/permissions Fantastic, now onto my next task creating a UDF using lazarus linking to ib_util.so in ubuntu. This should be fun as w

[firebird-support] creating a database in ubuntu

2011-10-08 Thread sir_wally_lewis
OK, I use ubuntu lucid ( 10.04 ) I have got all the way to installing and running firebird 2.1 super installing and running flamerobin every time i try to create a database i get this: Engine Code: 335544344 Engine Message : I/O error for file "/opt/data/firebird/blank/blank.fdb" Error whi

[firebird-support] Re: Pascal UDF passing timestamps/strings

2011-10-07 Thread sir_wally_lewis
, Frank Schlottmann-Gödde wrote: > > On 07.10.2011 10:44, sir_wally_lewis wrote: > > Has anyone successfully written a pascal UDF > > to pass timestamps/strings without using > > the ibobjects library? > > Yes, what problems do you face? > > mit freundlic

[firebird-support] Pascal UDF passing timestamps/strings

2011-10-07 Thread sir_wally_lewis
Has anyone successfully written a pascal UDF to pass timestamps/strings without using the ibobjects library? Kind Regards, Robert.