RE: [firebird-support] Subscribe and question

2018-05-10 Thread bog...@mordicom.si [firebird-support]
Precisely that, thanks

 

Regards Bogdan.

 

 

From: firebird-support@yahoogroups.com  
Sent: Thursday, May 10, 2018 9:52 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Subscribe and question

 

  

On 10-5-2018 09:27, bog...@mordicom.si   
[firebird-support] wrote:
> 
> 
> We've had Firebird 2.0 database in dialect 1.
> 
> When we installed 2.5 64 server, connection was not possible.
> 
> If my memory serves me well 

Ah, well as far as I know the dialect shouldn't make a difference there.. 
I would sooner suspect that your old 2.0 database was 32 bit, and when 
you moved to a 64 bit Firebird you might have needed to back up and 
restore the database. Older Firebird database formats have minor 
differences between 32 bit and 64 bit processes (this was fixed - iirc - 
with Firebird 2.1).

Mark
-- 
Mark Rotteveel





RE: [firebird-support] Subscribe and question

2018-05-10 Thread bog...@mordicom.si [firebird-support]
We've had Firebird 2.0 database in dialect 1.

When we installed 2.5 64 server, connection was not possible.

 

If my memory serves me well 

 

Bogdan

 

From: firebird-support@yahoogroups.com  
Sent: Thursday, May 10, 2018 9:09 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Subscribe and question

 

  

On 10-5-2018 08:01, bog...@mordicom.si   
[firebird-support] wrote:
> What is the dialect of the database ?

I don't see how the dialect would be relevant for this problem. Could 
you explain what problem you where thinking of?

Mark
-- 
Mark Rotteveel





RE: [firebird-support] Subscribe and question

2018-05-10 Thread bog...@mordicom.si [firebird-support]
What is the dialect of the database ?

 

Regards

Bogdan

 

From: firebird-support@yahoogroups.com  
Sent: Wednesday, May 9, 2018 4:48 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Subscribe and question

 

  

Hello,

 

I would have a question why, after automatic upate of WIN 10, update package 
1803,FB  2.0.5.13206 (our software using those two) generates an error 
335544721, Failed to established a connection?

We have tried a lot of posibilities, but no effect. 

We have upgrade to FB 3.0.3 and problem remains. 

We have been seeking solutions on WIN 10 part too (off IVP6, unblocked 3050 
port, unblocked FB), but no effect.

 

Any thoughts? 

 

Thank you very much  in advance!

 

Best regards,

Primoz J.

 

 

 

  _  

To elektronsko sporočilo in vse morebitne priloge predstavljajo poslovno 
skrivnost oziroma so zaupne in so namenjene izključno naslovniku. Kakršnokoli 
razkrivanje, distribucija ali kopiranje vsebine sporočila je izrecno 
prepovedano. Če ste sporočilo prejeli pomotoma, Vas prosimo, da o tem obvestite 
pošiljatelja, sporočilo pa takoj uničite.

-- 
This message has been scanned for viruses and dangerous content by 
  E.F.A. Project, and is believed to be clean. 





RE: [firebird-support] execute block where External datasource is localhost :p

2018-05-09 Thread bog...@mordicom.si [firebird-support]
FOR execute statement VSQL ON EXTERNAL DATA SOURCE 
'127.0.0..1:C:\BDD\D2018.gdb' 
AS USER 'sysdba' PASSWORD 'masterkey' INTO :panum, :nom, :prenom, :dna, 
:DATEMODIF DO  

 

 

127.0.0..1

To dots maybe ?

 

Regards

Bogdan

 

From: firebird-support@yahoogroups.com  
Sent: Tuesday, May 8, 2018 6:46 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] execute block where External datasource is 
localhost :p

 

  

i am writing a little .net application that connect to a remote database server 
hosted on internet to make a sort of replication .

so the database source live in my local firebird server the destination 
database is on the firebird server hosted on the intenet

here the query

execute block as DECLARE panum INT; DECLARE nom varchar(50); DECLARE prenom 
varchar(50); DECLARE dna date; DECLARE datemodif date; DECLARE VARIABLE VSQL 
VARCHAR(500); begin VSQL = 'select panum, nom, prenom, dna, DATEMODIF from 
patient where (datemodif is not null) and (datediff (day from current_date 
to cast(DATEMODIF as date)) >= 0) ';
 
 
FOR execute statement VSQL ON EXTERNAL DATA SOURCE 
'127.0.0..1:C:\BDD\D2018.gdb' 
AS USER 'sysdba' PASSWORD 'masterkey' INTO :panum, :nom, :prenom, :dna, 
:DATEMODIF DO  
 
merge into patient bb using (select :panum panum, :nom nom, :prenom prenom, 
:dna dna, :DATEMODIF datemodif  from RDB$DATABASE ) n on bb.panum = n.panum 
when matched 
then update set bb.nom = :nom, bb.prenom = :prenom, bb.dna = :DNA, 
bb.DATEMODIF = :DATEMODIF when not matched 
then insert(panum, nom, prenom, dna, datemodif) values(:panum, :nom, 
:prenom, :dna, :datemodif);
 
suspend;  end; 

both servers run fb3.0.3 on a windows 64 machines .

but it fail saying that it cannot find the host 127.0.0.1 .

 i have also tried localhost and my local ip adress as well .

if i flip the direction so my source database is the remote server and the 
destination is my local server it works

i know that's a little wierd but i have some constraints for doing it like that

any help is welcome , thanks .





RE: [firebird-support] Evaluate "empty" string

2017-08-17 Thread 'bogdan mordicom' bog...@mordicom.si [firebird-support]
too complicated, less readable and i guess consuming  more 

 

 

Bogdan 

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Thursday, August 17, 2017 9:17 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Evaluate "empty" string

 

  

>If (coalesce(terminal, '') <> '') then

 

No need for coalesce since  is an unknown state and compared with a value 
it neither returns true nor false. Hence, I suspect

 

if (trim(terminal) > '')

 

to be equivalent to

 

if (((CHAR_LENGTH(trim(terminal))>0) and (terminal is not null))

 

Set





---
Ta e-pošta je bila pregledana z Avast protivirusnim programom.
https://www.avast.com/antivirus


RE: [firebird-support] Evaluate "empty" string

2017-08-16 Thread 'bogdan mordicom' bog...@mordicom.si [firebird-support]
This is also possible

 

If (coalesce(terminal, '') <> '') then

 

Regards

 

Bogdan 

 

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Wednesday, August 16, 2017 6:39 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Evaluate "empty" string

 

  

May be this :

 

if (terminal<>'') and ( not  (terminal is null)) then

do something

 

With best regards

Michel

 

Le Mercredi 16 août 2017 18h20, "Mark Rotteveel m...@lawinegevaar.nl 
[firebird-support]"  a écrit :

 

  

On 16-8-2017 17:53, Jorge Andres Brugger jorge.brug...@gmail.com 
[firebird-support] wrote:
> Hello all.
> I need to evaluate if one SP varchar parameter is "not empty". I´m using:
> if (((CHAR_LENGTH(trim(terminal))>0) or (terminal is not null)) then  something>.
> If I send '' (empty string) as parameter content, the expression 
> evaluates to true (I´m expecting to get a false).
> What am I doing wrong?

An empty string is not null, so even though 
(CHAR_LENGTH(trim(terminal))>0) might be false, (terminal is not null) 
is true, so the IF evaluates to true and is executed.

Maybe you meant AND instead of OR?
-- 
Mark Rotteveel

 





---
Ta e-pošta je bila pregledana z Avast protivirusnim programom.
https://www.avast.com/antivirus


RE: [firebird-support] think there is a bug in gpre cobol for 2.5.x

2017-07-03 Thread 'bogdan mordicom' bog...@mordicom.si [firebird-support]
Hi

 

I haven't been working with Cobol for 25 years, but:

if Disconnect is in Procedure Division then Connect should also be there.

 

Regards Bogdan

 

 

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Monday, July 3, 2017 7:28 AM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] think there is a bug in gpre cobol for 2.5.x

 

  

Hi-

 

I gave this a really good look. It seems no matter what i do I get an error in 
gpre with cobol.

 

here is my cobol code:

 

IDENTIFICATION DIVISION. 

PROGRAM-ID. Moon.

ENVIRONMENT DIVISION.

Configuration Section.

Special-Names. 

DATA DIVISION.

WORKING-STORAGE section.

01 WS_TEXT PIC X(80).

EXEC SQL

SET DATABASE DB2 = 'localhost:employee';

EXEC SQL

CONNECT DB2;

   

PROCEDURE DIVISION.

EXEC SQL

SELECT COUNT(PHONE_EXT) INTO :WS_TEXT FROM EMPLOYEE;

DISPLAY 'FOO MEISTER'.



DISPLAY WS-TEXT.

   

EXEC SQL

DISCONNECT DB2;

STOP RUN.

 

I can't get it to run no matter whether I stand on my head or not. I get an 
error code of 104 or else 100 if I am using cursors. I have an alias of 
employee. does anyone out there have success with gpre with 2.5.7.27050-0?

i looked at a book on embedded sql. Pretty much the same except slightly 
different syntax to gpre cobol.

Any ideas where I can go for help? One guy said he changed versions ever so 
slightly and a different version worked for hi m. Is there an archive of 
slightly older versions? I also defined ISC_USER with exports etc. I'd like to 
try a different version of 2.5.x

 

thx. - jim 



   

 





---
Ta e-pošta je bila pregledana z Avast protivirusnim programom.
https://www.avast.com/antivirus


RE: [firebird-support] Extract seconds from timestamp

2016-01-06 Thread 'Bogdan' bog...@mordicom.si [firebird-support]
I know that – result is rounded to next integer number

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Wednesday, January 06, 2016 10:36 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Extract seconds from timestamp

 

  

select cast(extract(second from cast('12.12.2016 23:59:59:4900' as timestamp)) 
as integer) from rdb$database

 

59

 

 

On Wednesday, January 6, 2016 10:37 AM, "'Bogdan' bog...@mordicom.si 
[firebird-support]" <firebird-support@yahoogroups.com> wrote:

 

 

Hi all

 

I wonder if this is an error or sql srandard:

 

select cast(extract(second from cast('12.12.2016 23:59:59:9000' as timestamp)) 
as integer) from rdb$database

 

gives 60

 

Regards

< div class="yiv3464183871MsoNormal" id="yui_3_16_0_1_1452055013363_4929">  

Bogdan 

 





---
Ta e-pošta je bila pregledana z Avast protivirusnim programom.
https://www.avast.com/antivirus


[firebird-support] Extract seconds from timestamp

2016-01-06 Thread 'Bogdan' bog...@mordicom.si [firebird-support]
Hi all

 

I wonder if this is an error or sql srandard:

 

select cast(extract(second from cast('12.12.2016 23:59:59:9000' as
timestamp)) as integer) from rdb$database

 

gives 60

 

Regards

 

Bogdan 



---
Ta e-pošta je bila pregledana z Avast protivirusnim programom.
https://www.avast.com/antivirus


RE: [firebird-support] Extract seconds from timestamp

2016-01-06 Thread 'Bogdan' bog...@mordicom.si [firebird-support]
Tnx

 

Regards

 

Bogdan 

 

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Wednesday, January 06, 2016 6:53 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Extract seconds from timestamp

 

  

On 06/01/16 08:37, 'Bogdan' bog...@mordicom.si [firebird-support] wrote:
> I wonder if this is an error or sql srandard:
> 
> select cast(extract(second from cast('12.12.2016 23:59:59:9000' as
> timestamp)) as integer) from rdb$database

http://www.firebirdsql.org/refdocs/langrefupd21-intfunc-extract.html
Check the notes;)

-- 
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk





---
Ta e-pošta je bila pregledana z Avast protivirusnim programom.
https://www.avast.com/antivirus


[firebird-support] Character set

2015-10-15 Thread 'Bogdan' bog...@mordicom.si [firebird-support]
If someone can help me.

I have a database with character set = none.

That happened by mistake when upgrading dialect 1 database from 1.5 to 2.5.

 

What is the procedure to change character set back to win1250 as it used to
be.

 

Any help will be appreciated.

 

 

Regards,

 

Bogdan 

 

 



---
Ta e-pošta je bila pregledana z Avast protivirusnim programom.
https://www.avast.com/antivirus


RE: [firebird-support] What is better: UPDATE or DELETE + INSERT?

2015-09-16 Thread Mordico1 bog...@mordicom.si [firebird-support]
Nothing to think of. If you need update go with update otherwise delete and 
insert is better.

Trust yourself.

Regards
Bogdan


--- Original message ---
From: 'Leyne, Sean' s...@broadviewsoftware.com [firebird-support] 


Date: 16. september 2015 5.40.22 pop.
Subject: RE: [firebird-support] What is better: UPDATE or DELETE + INSERT?
To: firebird-support@yahoogroups.com




They will generate a comparable amount of garbage, but I think updating the
existing records is better than delete + insert, especially if there are also
foreign key references to those records.


I don't think so.

Unless you are updating every column in the row, the UPDATE will generate a 
smaller disk footprint, as the new record version will only include the 
updated fields -- not a full copy of the row.


Then there is the impact on index structures that Vlad has pointed out.


From a performance point of view, it would be *much faster*, if you are 
able to:

- disable all indexes for the target table,
- delete all rows,
- import new rows and
- reactivate all indexes for the target table

This would likely require that you have near-exclusive access/use of the 
target table.



Sean



RE: [firebird-support] Error in order by clause

2015-08-25 Thread 'Bogdan' bog...@mordicom.si [firebird-support]
I wasn't aware of this.

I've assumed that if i = 0 Firebird looks only at the first part of the second 
iif.

 

Thanks

 

Bogdan 

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Tuesday, August 25, 2015 11:47 AM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] Error in order by clause

 

  

(Not sure if this is a duplicate thread or the same as Wrong sort results but 
I'll answer here too)

 

You are using different results in the ORDER BY clause. That's not allowed. 
Your t.c is an INTEGER and your E is a VARCHAR but your sums are NUMERIC.

Even though the result is always the same (dependent on you input I), Firebird 
doesn't know that yet. For Firebird the result CAN VARY between records and 
that's not allowed (record one could be a VARCHAR and record 2 could be NUMERIC 
for all Firebir d knows). So you need to cast them all to the same type.

For instance this will work:

order by iif(:i = 1, cast(t.c as numeric), IIF(:i = 0, sum(t.a) - sum(t.b), 
cast(t.e as numeric))) DESCENDING

But if you want to order by E (=VARCHAR) maybe you should cast to VARCHAR but 
in that case you need to make sure the ordering is done correctly (with adding 
spaces in front of the sums to order right aligned)



---In firebird-support@yahoo groups.com, bogdan@... wrote :

It should be

 

SUMA  A B C D E

12   14 nbs p; 2 1 11   1

0 3 3 2 12   2

-1,11,2  2,3  1 11  ;  3

-1,83,4  5,2  2 11   3

Suma descending

Regards

Bogdan

 

 

- Reply message -

Van: 'Bogdan' bogdan@... [firebird-support] firebird-support@yahoogroups.com
Aan: firebird-support@yahoogroups.com
Onderwerp: [firebird-support] Error in order by clause
Datum: ma, aug. 24, 2015 10:37

 

order by iif(:i = 1, t.c, IIF(:I = 0, sum(t.a) - sum(t.b), E)) DESCENDING

 





---
Ta e-pošta je bila pregledana z Avast protivirusnim programom.
https://www.avast.com/antivirus


RE: [firebird-support] Error in order by clause

2015-08-24 Thread 'Bogdan' bog...@mordicom.si [firebird-support]
It should be

 

SUMA  A B C D E

12   14   2 1 11   1

0 3 3 2 12   2

-1,11,2  2,3  1 11   3

-1,83,4  5,2  2 11   3

Suma descending

Regards

Bogdan

 

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Monday, August 24, 2015 6:26 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Error in order by clause

 

  

As far as I can tell it sorts as it should. What sort are you expecting?

 

Mark

 

 

- Reply message -
Van: 'Bogdan' bog...@mordicom.si [firebird-support] 
firebird-support@yahoogroups.com
Aan: firebird-support@yahoogroups.com
Onderwerp: [firebird-support] Error in order by clause
Datum: ma, aug. 24, 2015 10:37

 

Hi to all

 

Server: Firebird 2.5.4. 

 

I have following stored procedure:

ALTER PROCEDURE TEST_ (

I SMALLINT)

RETURNS (

SUMA NUMERIC(15,2),

A NUMERIC(15,2),

B NUMERIC(15,2),

C INTEGER,

D VARCHAR(10),

E VARCHAR(10))

AS

begin

for select sum(t.a) - sum(t.b), sum(a), sum(b), c, d, e from  t

group by c, d, e

order by iif(:i = 1, t.c, IIF(:I = 0, sum(t.a) - sum(t.b), E)) DESCENDING

into :suma, :a, :b, :c, :d, :e

do suspend;

end

If i run it with paraneter i = 0 it gives wrong sort order.

Results:

SUMA  A B C D E

-1,11,2  2,3  1 11   3

-1,83,4  5,2  2 11   3

0 3 3 2 12   2

12   14   2 1 11   1

Otherwise the sort order is ok.

This propagates only when there is iif within iif clause.

Am i doing something wrong or it is a bug ?

 

Best regards

 

Bogdan

 

 

=  complete script:

SET SQL DIALECT 3;

/**/

/  Stored procedures   /

/**/

SET TERM ^ ;

CREATE PROCEDURE TEST_ (

I SMALLINT)

RETURNS (

SUMA NUMERIC(15,2),

A NUMERIC(15,2),

B NUMERIC(15,2),

C INTEGER,

D VARCHAR(10),

E VARCHAR(10))

AS

BEGIN

  SUSPEND;

END^

SET TERM ; ^

/**/

/Tables/

/**/

CREATE TABLE  (

A  NUMERIC(15,2),

B  NUMERIC(15,2),

C  INTEGER,

D  VARCHAR(10) COLLATE PXW_SLOV,

E  VARCHAR(10) COLLATE PXW_SLOV

);

/**/

/  Stored procedures   /

/**/

SET TERM ^ ;

CREATE OR ALTER PROCEDURE TEST_ (

I SMALLINT)

RETURNS (

SUMA NUMERIC(15,2),

A NUMERIC(15,2),

B NUMERIC(15,2),

C INTEGER,

D VARCHAR(10),

E VARCHAR(10))

AS

begin

for select sum(t.a) - sum(t.b), sum(a), sum(b), c, d, e from  t

group by c, d, e

order by iif(:i = 1, t.c, IIF(:I = 0, sum(t.a) - sum(t.b), E)) DESCENDING

into :suma, :a, :b, :c, :d, :e

do suspend;

end^

SET TERM ; ^

INSERT INTO  (A, B, C, D, E)

  VALUES (1.2, 2.3, 1, '11', '3');

INSERT INTO  (A, B, C, D, E)

  VALUES (3.4, 5.2, 2, '11', '3');

INSERT INTO  (A, B, C, D, E)

  VALUES (0, 1, 2, '12', '2');

INSERT INTO  (A, B, C, D, E)

  VALUES (3, 2, 2, '12', '2');

INSERT INTO  (A, B, C, D, E)

  VALUES (14, 2, 1, '11', '1');

COMMIT WORK;

 

 

 

  _  


 https://www.avast.com/antivirus Avast logo

Ta e-pošta je bila pregledana z Avast protivirusnim programom. 
www.avast.com https://www.avast.com/antivirus  

 





---
Ta e-pošta je bila pregledana z Avast protivirusnim programom.
https://www.avast.com/antivirus


[firebird-support] Error in order by clause

2015-08-24 Thread 'Bogdan' bog...@mordicom.si [firebird-support]
Hi to all

 

Server: Firebird 2.5.4. 

 

I have following stored procedure:

ALTER PROCEDURE TEST_ (

I SMALLINT)

RETURNS (

SUMA NUMERIC(15,2),

A NUMERIC(15,2),

B NUMERIC(15,2),

C INTEGER,

D VARCHAR(10),

E VARCHAR(10))

AS

begin

for select sum(t.a) - sum(t.b), sum(a), sum(b), c, d, e from  t

group by c, d, e

order by iif(:i = 1, t.c, IIF(:I = 0, sum(t.a) - sum(t.b), E))
DESCENDING

into :suma, :a, :b, :c, :d, :e

do suspend;

end

If i run it with paraneter i = 0 it gives wrong sort order.

Results:

SUMA  A B C D E

-1,11,2  2,3  1 11   3

-1,83,4  5,2  2 11   3

0 3 3 2 12   2

12   14   2 1 11   1

Otherwise the sort order is ok.

This propagates only when there is iif within iif clause.

Am i doing something wrong or it is a bug ?

 

Best regards

 

Bogdan

 

 

=  complete script:

SET SQL DIALECT 3;

/***
***/

/  Stored procedures
/

/***
***/

SET TERM ^ ;

CREATE PROCEDURE TEST_ (

I SMALLINT)

RETURNS (

SUMA NUMERIC(15,2),

A NUMERIC(15,2),

B NUMERIC(15,2),

C INTEGER,

D VARCHAR(10),

E VARCHAR(10))

AS

BEGIN

  SUSPEND;

END^

SET TERM ; ^

/***
***/

/Tables
/

/***
***/

CREATE TABLE  (

A  NUMERIC(15,2),

B  NUMERIC(15,2),

C  INTEGER,

D  VARCHAR(10) COLLATE PXW_SLOV,

E  VARCHAR(10) COLLATE PXW_SLOV

);

/***
***/

/  Stored procedures
/

/***
***/

SET TERM ^ ;

CREATE OR ALTER PROCEDURE TEST_ (

I SMALLINT)

RETURNS (

SUMA NUMERIC(15,2),

A NUMERIC(15,2),

B NUMERIC(15,2),

C INTEGER,

D VARCHAR(10),

E VARCHAR(10))

AS

begin

for select sum(t.a) - sum(t.b), sum(a), sum(b), c, d, e from  t

group by c, d, e

order by iif(:i = 1, t.c, IIF(:I = 0, sum(t.a) - sum(t.b), E))
DESCENDING

into :suma, :a, :b, :c, :d, :e

do suspend;

end^

SET TERM ; ^

INSERT INTO  (A, B, C, D, E)

  VALUES (1.2, 2.3, 1, '11', '3');

INSERT INTO  (A, B, C, D, E)

  VALUES (3.4, 5.2, 2, '11', '3');

INSERT INTO  (A, B, C, D, E)

  VALUES (0, 1, 2, '12', '2');

INSERT INTO  (A, B, C, D, E)

  VALUES (3, 2, 2, '12', '2');

INSERT INTO  (A, B, C, D, E)

  VALUES (14, 2, 1, '11', '1');

COMMIT WORK;

 

 



---
Ta e-pošta je bila pregledana z Avast protivirusnim programom.
https://www.avast.com/antivirus


RE: [firebird-support] error firebird v2.5.4 using trigger and hash function and update or delete record same content

2015-08-11 Thread 'Bogdan' bog...@mordicom.si [firebird-support]
I believe there is no PK in the table, so engine doesn't know what record to 
delete

 

Regards,

 

Bogdan 

 

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Tuesday, August 11, 2015 12:54 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] error firebird v2.5.4 using trigger and hash 
function and update or delete record same content

 

  

On 10 Aug 2015 14:23:44 -0700, email...@yahoo.com.br [firebird-support] 
mailto:email...@yahoo.com.br%20[firebird-support] 
firebird-support@yahoogroups.com wrote:
 - I add new records mannually, add one new ID field value and the other
 fields have your values by TRIGGER BEFORE INSERT
 - Then, I try add 2 or more record with ID = 1
 - Later, I try delete any one record and I have this message:
 
 *-*-*-*-*-*-*-*-*-*-* Firebird error message when trying delete or
update
 any record with same values in your fields *-*-*-*-*-*-*-*-*-*-*
 
 .Cannot delete record!
 .There is at least one record with same fields value!

These don't look like Firebird errors, is this coming from your
application? If so, show exactly what you're doing.

 .Error Message:
 .
 .Invalid token.
 .Dynamic SQL Error.
 .SQL error code = -104.
 .Unexpected end of command - line 2, column 66416683.

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

This indicates you have a syntax error somewhere

 Any idea for this error? The Firebird dont use Internal RDB$DB_KEY (or
 just DB_KEY) to control records (internal) in table when dont exist
 PrimaryKey or Index?

I am not sure what you mean with this, or how it would be relevant in the
context of this question.

Mark





---
Ta e-pošta je bila pregledana z Avast protivirusnim programom.
https://www.avast.com/antivirus


RE: [firebird-support] Soc Sec No comparison using Firebird

2015-06-25 Thread 'Bogdan' bog...@mordicom.si [firebird-support]
create procedure social_number_comparison (

  i1 varchar(20),

  i2 varchar(20)

)

returns (

  result varchar(100)

)

as

declare variable x1 char(20);

declare variable x2 char(20);

declare variable e smallint;

declare variable e1 smallint;

declare variable e2 smallint;

declare variable i smallint;

begin

  i = 0; x1 = i1; x2 = i2; e = 0;

  while (i  20 and e  3) do

  begin

 i = i + 1;

 if (substring(x1 from i for 1)  substring(x2 from i for 1)) then

begin

   e = e + 1;

   if (e = 1) then e1 = i;

   else if (e = 2) then e2 = i;

end

  end

 

  if (e = 0) then result = 'OK';

  else if (e = 3) then result = 'Not equal';

  else if (e = 1) then result = e1 || '. character ' || substring(i1 from i for 
1) || ' has changed';

  else

 begin

if (substring(x1 from e1 for 1) = substring(x2 from e2 for 1) and

substring(x1 from e2 for 1) = substring(x2 from e1 for 1)) then

result = e1 || ' and ' || e2 || ' were swapped';

 end

 

  suspend;

end

 

Regards, 

 

Bogdan 

 

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Wednesday, June 24, 2015 5:12 PM
To: Firebird Support
Subject: [firebird-support] Soc Sec No comparison using Firebird

 

  

 

Greetings All,

 

I would like to pass into a stored procedure two social security numbers for 
comparison and have the result tell me if one character has changed, or if two 
characters were switched or if it does not compare at all.  

 

Has anyone done anything like this they could share?  Or is it even possible?

 

Thoughts?

 

Thanks,

Mike

 

.  

 

  _  


 https://www.avast.com/antivirus Avast logo

This email has been checked for viruses by Avast antivirus software. 
www.avast.com https://www.avast.com/antivirus  

 





---
Ta e-pošta je bila pregledana z Avast protivirusnim programom.
https://www.avast.com/antivirus


RE: [firebird-support] Cumulative queries

2015-03-12 Thread 'Bogdan' bog...@mordicom.si [firebird-support]
Are you running superserver ?

If so i would recommend switching to  classic or superclassic

 

Regards

Bogdan 

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Thursday, March 12, 2015 8:06 AM
To: firebird-support@yahoogroups.com
Subject: Odp: [firebird-support] Cumulative queries

 

  

Hi,

This look for me like wrong design.
Query running minutes are not acceptable from my POV.

I do not know how your system work, but in any stock system i see month work. 
Month is closed and data are calculated and stored. And in next month the same

Regards,
Karol Bieniaszewski

- Reply message -
Od: apos;Tiberiu Horvathapos; tiberiu_horv...@yahoo.com [firebird-support] 
firebird-support@yahoogroups.com
Do: firebird-support@yahoogroups.com
Temat: [firebird-support] Cumulative queries
Data: czw., mar 12, 2015 07:19


  

Hi all, 

 

I have a Firebird stock management system with 100+ tables and 10+ clients. I 
have some cumulative queries in my Delphi program that generates reports. My 
problem is that while the queries are run (less than 5 minutes each), the whole 
system performance is poor, people complaining about the speed of the database. 
How do you deal with this ? 

 

Thinking about : 

1. Create a backup database and have the queries run there (backup / restore 
during the night) ? This would be the obvious option. If data for the reports 
is one day behind the real system is not a big problem.

 

2. In FireBird do I have some switch to lower the priority of a query ?  

select * from table –low priority mode-

 

some other ideas ? 

 

 

Thank you in advance , 

 

Tiberiu 

 





---
Ta e-pošta je bila pregledana z Avast protivirusnim programom.
http://www.avast.com


RE: [firebird-support] Re: Firebird 1.5 - CURRENT_TIMESTAMP difference

2014-12-15 Thread 'Bogdan' bog...@mordicom.si [firebird-support]

Sent: Monday, December 15, 2014 8:50 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Re: Firebird 1.5 - CURRENT_TIMESTAMP difference

 

  

On 14 Dec 2014 14:14:21 -0800, emad...@yahoo.com.au [firebird-support] 
mailto:emad...@yahoo.com.au%20[firebird-support] 
firebird-support@yahoogroups.com wrote:
 Unfortunately we're using 1.5 so NOW isn't available to us. 
 
 We're running the statements in real-time so a 30 minute difference is
 definitely wrong.. It is also exactly 30 minutes which leads me to
believe
 there's some kind of funny offset due to timezone or something to that
 effect that we aren't seeing for whatever reason. I thought if I
figured
 out where the CURRENT_TIMESTAMP statement is pulling its time from I
 would know where to look for the issue.

Do you also get this 30 minute difference if you execute SELECT
CURRENT_TIMESTAMP FROM RDB$DATABASE from ISQL and/or Flamerobin, or only
inside your application?

What is your own timezone, and what is the server timezone?

Mark

The last time i've seen such behaviour, we found there was another job 
scheduled every 30 minutes
that took all the resources

Regards

Bogdan

 

 



---
avast! Antivirusna zaščita. E-pošta je čista. Ne vsebuje virusov in zlonamerne 
programske kode. Prenesite si avast! Antivirusno zaščito iz www.avast.si.
http://www.avast.com