ODP: [firebird-support] Prevent overlaping dates in concurent environment

2018-09-12 Thread Karol Bieniaszewski liviusliv...@poczta.onet.pl [firebird-support]
more ideas at the moment. have a good one Tomasz -- __--==--__ __--== Tomasz Tyrakowski ==--__ __--== SOL-SYSTEM ==--__ __--== http://www.sol-system.pl ==--__ __--==--__ __ Information from ESET Mail Security, version

RE: [firebird-support] Prevent overlaping dates in concurent environment

2018-09-12 Thread 'Louis van Alphen' lo...@nucleo.co.za [firebird-support]
==--__ __--== Tomasz Tyrakowski ==--__ __--== SOL-SYSTEM ==--__ __--== http://www.sol-system.pl ==--__ __--==--__ __ Information from ESET Mail Security, version of virus signature database 18037 (20180912) __ The mes

Re: [firebird-support] Prevent overlaping dates in concurent environment

2018-09-12 Thread Tomasz Tyrakowski t.tyrakow...@sol-system.pl [firebird-support]
On 12.09.2018 at 15:04, Svein Erling Tysvær setys...@gmail.com [firebird-support] wrote: > Why wouldn't my suggestion work, Tomasz? When Karol inserts his first row > into his main table it will contain DATE_FROM 2018-09-10 and DATE_TO > 2018-09-20 and the trigger would insert 11 rows (one for

[firebird-support] Using Union and Join (of two tables residing in different databases) in a Query

2018-09-12 Thread 'Stellarancia.com' ni...@stellarancia.com [firebird-support]
I'm transferring many tables (967) from single BDE .DBF files (old driver DbIV) to Firebird 2.5. I utilize Delphi 7 as environment and ZEOS components to Firebird connections: the work is enough easy. A large number of old queries contain UNIONS and JOINS of tables (-> single files .DBF), but

RE: [firebird-support] Prevent overlaping dates in concurent environment

2018-09-12 Thread Omacht András aoma...@mve.hu [firebird-support]
y, version of virus signature database 18037 (20180912) __ The message was checked by ESET Mail Security. http://www.eset.com [Non-text portions of this message have been removed] [Non-text portions of this message have been removed] [Non-text portions of this message have been removed] _

Re: [firebird-support] Prevent overlaping dates in concurent environment

2018-09-12 Thread Tomasz Tyrakowski t.tyrakow...@sol-system.pl [firebird-support]
On 12.09.2018 at 14:40, Omacht András aoma...@mve.hu [firebird-support] wrote: > [...] >while (curr_date <= new.date_to) do > > begin > >insert into reserved_date (res_date) values (:curr_date); > >curr_date = dateadd(1 day to curr_date); > > end > > end On a

[firebird-support] Re: Identify wirecompression

2018-09-12 Thread hv...@users.sourceforge.net [firebird-support]
> how to identify that connection use WireCompression effectively? See http://tracker.firebirdsql.org/browse/CORE-5536 http://tracker.firebirdsql.org/browse/CORE-5536 and http://tracker.firebirdsql.org/browse/CORE-5601 http://tracker.firebirdsql.org/browse/CORE-5601 Hope it

ODP: [firebird-support] Prevent overlaping dates in concurentenvironment

2018-09-12 Thread Karol Bieniaszewski liviusliv...@poczta.onet.pl [firebird-support]
--== SOL-SYSTEM ==--__ __--== http://www.sol-system.pl ==--__ __--==--__ __ Information from ESET Mail Security, version of virus signature database 18037 (20180912) __ The message was checked by ESET Mail Security. http://www.eset.com [Non-te

[firebird-support] Re: Transaction access mode (read only vs. read write) from context?

2018-09-12 Thread hv...@users.sourceforge.net [firebird-support]
> According to the documentation > (https://firebirdsql.org/refdocs/langrefupd20-get-context.html) I can retrive > the transaction’s isolation level: > select rdb$get_context('SYSTEM', > 'ISOLATION_LEVEL') from rdb$database > > But I need to know the access mode too. Is this possible

Re: [firebird-support] Using Union and Join (of two tables residing in different databases) in a Query

2018-09-12 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
11.09.2018 10:43, 'Stellarancia.com' ni...@stellarancia.com [firebird-support] wrote: > Do you have any suggestion as to how to solve this problem? Put both tables into one database. -- WBR, SD.

ODP: [firebird-support] Re: Identify wirecompression

2018-09-12 Thread Karol Bieniaszewski liviusliv...@poczta.onet.pl [firebird-support]
Yes, it help me. I can obtain this info on client side And i can store this info into separate table to simply obtain on the server side. In Fb4 i see this will be simpler. regards, Karol Bieniaszewski Od: hv...@users.sourceforge.net [firebird-support] Wysłano: środa, 12 września 2018 18:19

[firebird-support] Prevent overlaping dates in concurent environment

2018-09-12 Thread liviuslivius liviusliv...@poczta.onet.pl [firebird-support]
Hi,   is there a good way to prevent overlaping dates to be inserted to the table?   You know DATE_FROM, DATE_TO and you can have  2018-09-10 to 2018-09-20 and 2018-09-15 to 2018-09-22 they ovelap on 15,16,17,18,19 and 20     No my real sample but simple to understand is:   customer and meeting

RE: [firebird-support] Prevent overlaping dates in concurent environment

2018-09-12 Thread Omacht András aoma...@mve.hu [firebird-support]
commit and user2 commit, then overlaping dates can be inserted into database. regards, Karol Bieniaszewski __ Information from ESET Mail Security, version of virus signature database 18037 (20180912) __ The message was checked by ESET Mail Security. http://www.eset.com [Non

Re: [firebird-support] Prevent overlaping dates in concurent environment

2018-09-12 Thread Tomasz Tyrakowski t.tyrakow...@sol-system.pl [firebird-support]
On 12.09.2018 at 13:29, Omacht András aoma...@mve.hu [firebird-support] wrote: > Create a (reserved_dates) table with date field, and make that field unique.. > When a user inserts a date into the reservation table a trigger immadiate > inserts this date to the reserved_dates table too. Then

Re: [firebird-support] Prevent overlaping dates in concurent environment

2018-09-12 Thread Svein Erling Tysvær setys...@gmail.com [firebird-support]
What about a separate table for dates with one row per date and a UNIQUE constraint that you populate from a (AFTER INSERT/DELETE) trigger on your real table? HTH, Set Den ons. 12. sep. 2018 kl. 11:49 skrev liviuslivius liviusliv...@poczta.onet.pl [firebird-support] <

Re: [firebird-support] Prevent overlaping dates in concurent environment

2018-09-12 Thread Svein Erling Tysvær setys...@gmail.com [firebird-support]
Why wouldn't my suggestion work, Tomasz? When Karol inserts his first row into his main table it will contain DATE_FROM 2018-09-10 and DATE_TO 2018-09-20 and the trigger would insert 11 rows (one for each date) into my suggested table. When the next row is inserted with DATE_FROM 2018-09-15 and

RE: [firebird-support] Prevent overlaping dates in concurent environment

2018-09-12 Thread liviuslivius liviusliv...@poczta.onet.pl [firebird-support]
Hi, but this require to have table with all dates. 365 rows per year per customer. This is not possible solution. This sample with customers  was only simplification. But extend this sample to meeting time date with time. This table will be too huge... Regards,Karol Bieniaszewski null

Re: [firebird-support] Prevent overlaping dates in concurent environment

2018-09-12 Thread Tomasz Tyrakowski t.tyrakow...@sol-system.pl [firebird-support]
On 12.09.2018 at 14:40, Omacht András aoma...@mve.hu [firebird-support] wrote: > Tested on 2.5.8, dialect 1: > > > > CREATE TABLE RESERVED_DATE ( > > RES_DATE DATE NOT NULL > > ); > > ALTER TABLE RESERVED_DATE ADD CONSTRAINT RESERVED_DATE_PK PRIMARY KEY > (RES_DATE); > > > >

RE: [firebird-support] Prevent overlaping dates in concurent environment

2018-09-12 Thread Omacht András aoma...@mve.hu [firebird-support]
SYSTEM ==--__ __--== http://www.sol-system.pl ==--__ __--==--__ __ Information from ESET Mail Security, version of virus signature database 18037 (20180912) __ The message was checked by ESET Mail Security. http://www.eset.com [Non-text portions of this message have been removed]

[firebird-support] Identify wirecompression

2018-09-12 Thread liviuslivius liviusliv...@poczta.onet.pl [firebird-support]
Hi,   how to identify that connection use WireCompression effectively? I need to get that info: 1. from client application side 2. from server side   regards, Karol Bieniaszewski

[firebird-support] Transaction access mode (read only vs. read write) from context?

2018-09-12 Thread Omacht András aoma...@mve.hu [firebird-support]
for a lot of transactions (because of the full database lock while it's processing). Thanks, András __ Information from ESET Mail Security, version of virus signature database 18037 (20180912) __ The message was checked by ESET Mail Security. http://www.eset.com

[firebird-support] Prevent overlaping dates in concurent environment

2018-09-12 Thread liviuslivius liviusliv...@poczta.onet.pl [firebird-support]
Hi,   is there a good way to prevent overlaping dates to be inserted to the table?   You know DATE_FROM, DATE_TO and you can have  2018-09-10 to 2018-09-20 and 2018-09-15 to 2018-09-22 they ovelap on 15,16,17,18,19 and 20     No my real sample but simple to understand is:   customer and meeting