RE: [firebird-support] Timestamp in different regions

2020-04-30 Thread 'Zoran' zoran...@gmail.com [firebird-support]
Hi Gregor

 

Thank you for the answer.

 

I’m using FireDAC components. FB version is 3.0.5. My middle-ware server 
program and FB engine are on VPS located in US. I’m developing client app also 
in US. All works ok since both programs are in the same region.

 

I have VM with Win 10 and region set to Europe. I’ve installed FB and server 
middle-ware in this VM as well. When I execute client app connecting to US 
server, I get the error. When I execute client app connecting to the local 
server (which on the same VM machine) all works ok.

 

I’m not using client-library fbclient.dll or GDS32.dll. This is multi-user app, 
some users are in US some are in Europe.

 

Error happens as soon as I execute ‘qry.Open;’ statement. Karol suggested to 
debug the code and I will. But this will go to FireDAC code which is rather 
complicated. That’s why I’ve asked here if someone experienced similar problem.

 

Regards

Zoran

 

 

From: firebird-support@yahoogroups.com  
Sent: Thursday, April 30, 2020 11:35 AM
To: 'Zoran' zoran...@gmail.com [firebird-support] 

Subject: Re: [firebird-support] Timestamp in different regions

 

  

Hello Zoran

Witch Component do you useing in Delphi FireDAC?

Are you shure, that that your clients uses the right client-library 
fbclient.dll or GDS32.dll? Means FB 3.0.5 should use fbclient from V3.0.5

What FB Version do you use?

Best Regards
Gregor



Sent from Yahoo Mail. Get the app



On Thursday, April 30, 2020, 05:30:22 PM GMT+2, 'Zoran' zoran...@gmail.com 
[firebird-support]  wrote: 

 

 

 

Thank you, Karol.

 

Probably not FB message. I guess it’s coming from Delphi. It happens right 
after I execute ‘qry.Open;’ statement..

What I was hopping for is if someone with Delphi background can shed some light 
on Delphi handling this situation.

 

 

From: firebird-support@yahoogroups.com  
Sent: Thursday, April 30, 2020 11:09 AM
To: firebird-support@yahoogroups.com
Subject: ODP: [firebird-support] Timestamp in different regions

 

  

I do not suppose that this is Firebird message.

This looks like client program message. 

 

regards,

Karol Bieniaszewski

 

 

Firebird 3.0.5, Delphi 10.3.3

 

In a table I have TIMESTAMP column. If I read that table from the client in the 
same Region as server all is ok. If I read the same table where client is in 
the different region than server, I get error message 'Could not parse SQL 
TimeStamp string'. 

 

In another words if server is in US and client is in US all is ok. If server is 
in Europe and client is in Europe, all is ok. But, if server is in US and 
client is in Europe (and vice-versa) I get this error.

 

Does anyone experience this, or am I missing something here?_,

 

Thank you

Zoran





[Non-text portions of this message have been removed]



RE: [firebird-support] Timestamp in different regions

2020-04-30 Thread 'Zoran' zoran...@gmail.com [firebird-support]
Thank you, Karol.

 

Probably not FB message. I guess it’s coming from Delphi. It happens right 
after I execute ‘qry.Open;’ statement.

What I was hopping for is if someone with Delphi background can shed some light 
on Delphi handling this situation.

 

 

From: firebird-support@yahoogroups.com  
Sent: Thursday, April 30, 2020 11:09 AM
To: firebird-support@yahoogroups.com
Subject: ODP: [firebird-support] Timestamp in different regions

 

  

I do not suppose that this is Firebird message.

This looks like client program message. 

 

regards,

Karol Bieniaszewski

 

 

Firebird 3.0.5, Delphi 10.3.3

 

In a table I have TIMESTAMP column. If I read that table from the client in the 
same Region as server all is ok. If I read the same table where client is in 
the different region than server, I get error message 'Could not parse SQL 
TimeStamp string'. 

 

In another words if server is in US and client is in US all is ok. If server is 
in Europe and client is in Europe, all is ok. But, if server is in US and 
client is in Europe (and vice-versa) I get this error.

 

Does anyone experience this, or am I missing something here?_,

 

Thank you

Zoran





[firebird-support] Timestamp in different regions

2020-04-30 Thread 'Zoran' zoran...@gmail.com [firebird-support]
Firebird 3.0.5, Delphi 10.3.3

 

In a table I have TIMESTAMP column. If I read that table from the client in the 
same Region as server all is ok. If I read the same table where client is in 
the different region than server, I get error message 'Could not parse SQL 
TimeStamp string'. 

 

In another words if server is in US and client is in US all is ok. If server is 
in Europe and client is in Europe, all is ok. But, if server is in US and 
client is in Europe (and vice-versa) I get this error.

 

Does anyone experience this, or am I missing something here?_,

 

Thank you

Zoran

___



RE: [firebird-support] 3.x - Check if DB exist using alias

2019-08-06 Thread 'Zoran' zoran...@gmail.com [firebird-support]
Agreed. But he can write a UDF in Delphi and define it in special 'Info.fdb'
which is available all the time and requires no security. Since Firebird is
running this UDF, it has all the permissions.

 

 

From: firebird-support@yahoogroups.com  
Sent: Monday, August 5, 2019 11:25 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] 3.x - Check if DB exist using alias

 

  

On 2019-08-05 15:58, 'Zoran' zoran...@gmail.com [firebird-support] 
wrote:
> What Dimitry said, or you can try this:
> 
> 
> 
> 
> 
> function _GetAliasDBFName(alias): string;
> 
> var
> 
> sl: TStringList;
> 
> begin
> 
> result := '';
> 
> sl := TStringList.Create;
> 
> try
> 
> sl.LoadFromFile('C:\Program 
> Files\Firebird\Firebird_3_0\databases.conf');
> 
> result := sl.Values[alias];
> 
> finally
> 
> sl.Free;
> 
> end;
> 
> end;
> 
> 
> 
> Simply call _ GetAliasDBFName and pass your alias name as a param.
> Problem might arise if FB team chooses to change name of database.conf
> file, or re-allocate it.

That doesn't work remote, nor will it work if the user running this 
doesn't have read access to databases.conf.

Mark





[Non-text portions of this message have been removed]



RE: [firebird-support] 3.x - Check if DB exist using alias

2019-08-05 Thread 'Zoran' zoran...@gmail.com [firebird-support]
What Dimitry said, or you can try this:

 

 

function _GetAliasDBFName(alias): string;

  var

sl: TStringList;

  begin

result := '';

sl := TStringList.Create;

try

  sl.LoadFromFile('C:\Program Files\Firebird\Firebird_3_0\databases.conf');

  result := sl.Values[alias];

finally

  sl.Free;

end;

  end;

 

Simply call _ GetAliasDBFName and pass your alias name as a param. Problem 
might arise if FB team chooses to change name of database.conf file, or 
re-allocate it.

 

 

 

From: firebird-support@yahoogroups.com  
Sent: Monday, August 5, 2019 8:06 AM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] 3.x - Check if DB exist using alias

 

  

I'm using Delphi.

Which is the best way to check if a database exist if my connection is alias 
based?

 

I have to try to connect and manage response?

Is there another way?

 

Fabio Codebue



P-SOFT di Codebue Fabio

Via Nuova n. 9 - 24060 Tavernola B.sca (BG)

P.I. 03624950162

C.F. CDBFBA72A11C618T

Mobile: +39.348.3515786

Fax: +39.030.5100306

Web:   http://www.p-soft.biz

 

pec: amministrazi...@pec.p-soft.biz  
cod.intermediario SDI: KRRH6B9
 





[Non-text portions of this message have been removed]



RE: [firebird-support] Is it a Trigger Problem?

2019-07-18 Thread 'Zoran' zoran...@gmail.com [firebird-support]
3.0.4 SuperServer, Win 10 Pro, 12  GB RAM. Nothing else is running on this 
machine.

 

Output from gbak:

 

C:\Program Files\Firebird\Firebird_3_0>gbak -Z

gbak:gbak version WI-V3.0.4.33054 Firebird 3.0

 

Sorry, I cannot reproduce error. It happens sporadically (maybe once in 2-3 
months), no pattern. 

 

We are going to replace server machine with a new one and see what happens.

 

Thank you.

Zoran

 

 

From: firebird-support@yahoogroups.com  
Sent: Thursday, July 18, 2019 9:20 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Is it a Trigger Problem?

 

  

On 2019-07-18 14:26, 'Zoran' zoran...@gmail.com [firebird-support] 
wrote:
> Hi András
> 
> I did that already. This is happening very seldom, so I have to wait.
> 
> I suspect some disk sectors are (going) bad and this could be a 
> hardware
> problem.

It is unlikely that bad sectors would result in two rows being added 
instead of one.

It would be helpful to know your full Firebird version, and if you can 
provide a minimal but reproducible example.

Mark





[Non-text portions of this message have been removed]



RE: [firebird-support] Is it a Trigger Problem?

2019-07-18 Thread 'Zoran' zoran...@gmail.com [firebird-support]
Hi András

I did that already. This is happening very seldom, so I have to wait.

I suspect some disk sectors are (going) bad and this could be a hardware
problem.

Thank you for suggestion.

Zoran

-Original Message-
From: firebird-support@yahoogroups.com  
Sent: Thursday, July 18, 2019 1:01 AM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] Is it a Trigger Problem?

Hi Zoran!

I suggest you to make unique key on
"T_ORDERCUSTOMER".OrderId
and
T_ORDERVEHICLE".OrderId

and you will get an exception when the secound row is inserted into the
tables.

Maybe this helps to find out where is the problem.

András

From: firebird-support@yahoogroups.com 
Sent: Wednesday, July 17, 2019 4:47 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Is it a Trigger Problem?


This might sound impossible...

I have one master and two detail tables. Relation is defined thru Foreign
Key and cascade delete. When I insert a master row, the master table trigger
inserts one empty detail row (only master key column populated)) in each of
the two detail tables. So each master row has only one detail row in each of
two detail tables and that doesn't change during the life of a master row.

All works well. Very, very seldom my client gets two detail rows for the
same master row. Sometimes it is in detail 1 table, sometimes it is in
detail 2 table. There are 5 users updating and inserting new rows 8 hours a
day. Database size is small (about 10,000 rows in the main table).

Application code does not insert any rows into detail tables, just updates
them. There are several triggers in the database, but the only one that
touches detail tables is the one in the master table.

Now crazy question. How is this possible? Is there any special circumstance
in FB which might cause this?

Here is part of the trigger in master table:

  if (INSERTING) then
  begin
insert into "T_ORDERCUSTOMER" (OrderId) values (new.Id);
insert into "T_ORDERVEHICLE" (OrderId) values (new.Id); 

Server: FB 3.4, Win 10 Pro, 12GB RAM

Workstations: Win 10 Home and Pro, 4-8GB RAM
Development: Delphi 10.3.1, Win 10 Ent, 32GB RAM

Tnx.



__ Information from ESET Mail Security, version of virus signature
database 19701 (20190717) __

The message was checked by ESET Mail Security.
http://www.eset.com



__ Information from ESET Mail Security, version of virus signature
database 19705 (20190718) __

The message was checked by ESET Mail Security.
http://www.eset.com



[Non-text portions of this message have been removed]







++

Visit http://www.firebirdsql.org and click the Documentation item on the
main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at
http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links





[firebird-support] Is it a Trigger Problem?

2019-07-17 Thread 'Zoran' zoran...@gmail.com [firebird-support]
This might sound impossible...

 

I have one master and two detail tables. Relation is defined thru Foreign
Key and cascade delete. When I insert a master row, the master table trigger
inserts one empty detail row (only master key column populated)) in each of
the two detail tables. So each master row has only one detail row in each of
two detail tables and that doesn't change during the life of a master row.

 

All works well. Very, very seldom my client gets two detail rows for the
same master row. Sometimes it is in detail 1 table, sometimes it is in
detail 2 table. There are 5 users updating and inserting new rows 8 hours a
day. Database size is small (about 10,000 rows in the main table).

 

Application code does not insert any rows into detail tables, just updates
them. There are several triggers in the database, but the only one that
touches detail tables is the one in the master table.

 

Now crazy question. How is this possible? Is there any special circumstance
in FB which might cause this?

 

Here is part of the trigger in master table:

 

  if (INSERTING) then

  begin

insert into "T_ORDERCUSTOMER" (OrderId) values (new.Id);

insert into "T_ORDERVEHICLE" (OrderId) values (new.Id);

..

 

Server: FB 3.4, Win 10 Pro, 12GB RAM

Workstations: Win 10 Home and Pro, 4-8GB RAM

Development: Delphi 10.3.1, Win 10 Ent, 32GB RAM

 

Tnx.



RE: [firebird-support] Proper Case Function for Firebird 2.5.4 and above

2019-07-15 Thread 'Zoran' zoran...@gmail.com [firebird-support]
This is strange. When I run it in Firebird Maestro 17.1 it returns empty
string. When I run it is Database Workbench 5.5 it works as expected.

 

 

From: firebird-support@yahoogroups.com  
Sent: Monday, July 15, 2019 7:50 AM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Proper Case Function for Firebird 2.5.4 and
above

 

  

Greetings All,

We are currently on Firebird 2.5.4 and hope to move to Firebird 3.0 by the
end of this year once I determine what all needs to take place in
preparation to do so.

One of the things we did when moving from Firebird 1.5 to 2.5 was to remove
the dependencies on external UDF's from FreeAdhocUDF since Firebird at that
point contained an internal replacement for most of those that we used.

I have one UDF left to replace F_PROPERCASE(). It appears Firebird 2.5 nor
Firebird 3.0 have a replacement internal UDF for this one unless I missed
it.

So we tried to come up with a way of doing this with a few stored procedures
that my associate wrote. They are included below.

They compiled and worked great. The next day when I tried to extract the
metadata on my development database and the database on the office server to
compare them to do an update script I received an error that I need guidance
with.

First off here is how to use the stored procedures:

PROPER_CASE('firebird support group') which would return 1 value containing:
Firebird Support Group

PROPER_CASE calls SPLITTER:
SPLITTER('firebird support group', ' ') which would return 3 values in the
cursor containing:
firebird
support
group

Here are the two stored procedures:

set term ^ ;
create or alter procedure SPLITTER (
in_str varchar(8190), 
in_splitter char(1))
returns (
out_str varchar(8190) )
as
declare variable iLast integer;
declare variable iNext integer;
declare variable iLen integer;
begin
iLast = 1;
iNext = position(:in_splitter, in_str, iLast); 
iLen = char_length(in_str) + 1;
if (:iNext = 0) then
begin
out_str = in_str;
suspend;
end
else
begin
while (:iNext > 1) do
begin
out_str = substring(:in_str from :iLast for :iNext - :iLast);
iLast = iNext + 1;
iNext = position(:in_splitter, in_str, iLast);
suspend;
end
if (iNext = 0 and iLast > 1) then
begin
out_str = substring(:in_str from :iLast for :iLen - :iLast);
suspend;
end
end
end^
set term ; ^

GRANT EXECUTE
ON PROCEDURE SPLITTER TO SYSDBA;

set term ^ ;
create or alter procedure PROPER_CASE (
in_str varchar(8190) )
returns (
out_str varchar(8190) )
as
declare variable tmp varchar(8190);
declare variable tcase varchar(8190);
begin
out_str = '';
for select out_str from SPLITTER(:in_str, ' ') into :tmp
do begin
if (char_length(tmp) > 0) then
tcase = upper(left(tmp, 1)) || lower(right(tmp, char_length(tmp)
-1));
if (char_length(tcase) > 0 and char_length(out_str) > 0) then
out_str = out_str || ' ' || tcase;
else
out_str = tcase;
end
suspend;
end^
set term ; ^

GRANT EXECUTE
ON PROCEDURE PROPER_CASE TO SYSDBA;



So what was the error?

When extracting the metadata on the production database:
Procedure SPLITTER: Invalid factor in expression (POSITION)
Script: Line:11 Pos:20

Anyone have any idea what needs to be done to correct this problem? Or does
anyone have another way to proper case a string without using F_PROPERCASE
external function?

Thanks for all who reply with advice on how to proceed.

Mike





[Non-text portions of this message have been removed]



RE: [firebird-support] Firebird UDF Access configuration failing

2018-03-28 Thread 'Zoran' zoran...@gmail.com [firebird-support]
For what it’s worth… In my opinion Dimitry is right. You remember things when 
you figure it out by yourself (with a little hint from someone).

 

If you get the answer on a plate, you are most likely to ask it again and again 
over time…

 

From: firebird-support@yahoogroups.com  
Sent: Tuesday, March 27, 2018 7:41 AM
To: firebird-support 
Subject: Re: [firebird-support] Firebird UDF Access configuration failing

 

  

I agree with Mark. SD, you often jerk people around when you could actually 
directly help. The way you often reply just pisses people off.

 

 

 On Tue, 27 Mar 2018 06:51:59 -0400 Dimitry Sibiryakov s...@ibphoenix.com 
[firebird-support]  wrote 

 

27.03.2018 12:49, Mark Rotteveel m...@lawinegevaar.nl [firebird-support] wrote: 

> Dimitry, it would be more helpful if you explicitly pointed out the 

> problem instead of giving vague hints. 

 

Yes, but giving a fish to a man used to be considered less helpful than 
teaching him 

how to fish. 

 

 

 





[Non-text portions of this message have been removed]



RE: [firebird-support] Info

2017-12-20 Thread 'Zoran' zoran...@gmail.com [firebird-support]
Hello Helen

 

I understand that we shouldn't mess up with IDENTITY column, as you said. I
have the same problem as original poster and I'm using this code

 

SELECT G.RDB$GENERATOR_NAME

FROM RDB$RELATION_FIELDS AS G

WHERE G.RDB$RELATION_NAME = 'CUSTOMER'

AND G.RDB$FIELD_NAME = (SELECT F.RDB$FIELD_NAME

FROM RDB$INDEX_SEGMENTS AS F

LEFT JOIN RDB$RELATION_CONSTRAINTS AS RC ON
(RC.RDB$INDEX_NAME = F.RDB$INDEX_NAME)

WHERE RC.RDB$RELATION_NAME = 'CUSTOMER'

AND RC.RDB$CONSTRAINT_TYPE = 'PRIMARY KEY')

 

to obtain IDENTITY sequencer name.  Then I increase it to get the next
IDENTITY for master table, which I then populate into master-key columns of
the detail table.

 

Is this approach 'legit'? Will I run into problems in the future (assuming
that RDB$ table structures don't change)?

 

Thanks.

Zoran

 

 

 

 

From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] 
Sent: Tuesday, December 19, 2017 2:29 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Info

 

Hello Nico,

Wednesday, December 20, 2017, 4:34:09 AM, you wrote:

> CREATE TABLE ADDRESSES (
> ID INTEGER GENERATED BY DEFAULT AS IDENTITY NOT NULL,
> ADDRESSNAME VARCHAR(100) COLLATE UNICODE_CI_AI,
.

> Id = 1 / AddressName = Test / ..
> Id = 2 / AddressName = Test2 / ..

> I want to know the next Id number in my table Addresses without an
> insert. In my example it will be 3. I want to reserve (without an
> insert) Id number 3 because someone else can also ask the next Id
> number. In that case it must be id number = 4, because you've got
> Number 1 and 2 in the table and number 3 is reserved.

IDENTITY is just lexical candy, useful when you have a generated id
that fires only on inserts. You can mess around with the start number
to some degree, using DDL commands, but otherwise the underlying
generator (sequence) cannot be manipulated, as the name of the internal
generator for the column is unknown to clients. This is what IDENTITY
is about, in fact.

For any id's that you want to manipulate the way you describe, create
an explicit generator for it, along with a BI trigger for the table to
set the conditions for firing the generator. You can use the NEXT
VALUE FOR  command when you want to capture the next
value without firing the trigger. Generators fire outside the
transaction context of the request so, once a value is fetched, the
generator cannot return the same value again.

Of course, you don't want the trigger to fetch another new value and
overwrite the one you reserved, so you must make your BI trigger
detect whether the INSERT command supplies a value.

Helen Borrie

_._,___



RE: [firebird-support] reset autoincrement field

2016-12-02 Thread 'Zoran' zoran...@gmail.com [firebird-support]
IDENTITY in FB3 uses the same logic as previous versions (trigger and
generator), only it is hidden from the user. Behind the scenes it is doing
that.

 

If you don't find the better solution, here is how you can get generator
name for the Primary Key (IDENTITY):

(change CUSTOMER to your table name)

 

SELECT g.RDB$GENERATOR_NAME

FROM RDB$RELATION_FIELDS AS g

WHERE g.RDB$RELATION_NAME = 'CUSTOMER'

AND g.RDB$FIELD_NAME = (SELECT f.rdb$field_name

FROM rdb$index_segments AS f

LEFT JOIN rdb$relation_constraints AS rc ON
(rc.rdb$index_name = f.rdb$index_name)

WHERE rc.rdb$relation_name = 'CUSTOMER'

AND rc.rdb$constraint_type = 'PRIMARY KEY')

 

 

 

 

From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] 
Sent: Friday, December 2, 2016 10:37 AM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] reset autoincrement field

 

  

I only use the property Identity to make an autoincrement field and I don't
make use of generators. Therefore 'How can I reset an autoincrement field in
firebird 3 ? I used identity to make an autoincrement field' ?

Nico Speleers
Analyst

Carfac bvba

Driving on experience

Rijksweg 53
9680 Maarkedal
Tel. +32 55 23 00 00
Fax +32 55 31 00 95
nico.spele...@carfac.com
www.carfac.be
[cid:image001.jpg@01D11613.C23F19C0][cid:image002.jpg@01D11613.C23F19C0] [cid:image003.jpg@01D11613.C23F19C0]


[Beschrijving: Beschrijving: Beschrijving: CarfacAS
(klein)]

Van: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com]
Verzonden: vrijdag 2 december 2016 16:34
Aan: firebird-support@yahoogroups.com
Onderwerp: RE: [firebird-support] reset autoincrement field

To see current generator value

select gen_id(generator-name, 0) from rdb$database

To set generator value

set generator generator-name to value;

From:
firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com]
Sent: Friday, December 2, 2016 10:13 AM
To:
firebird-support@yahoogroups.com
Subject: [firebird-support] reset autoincrement field

How can I reset an autoincrement field in firebird 3 ? I used identity to
make an autoincrement field.

Thanks.

Nico Speleers
Analyst

Carfac bvba

Driving on experience

Rijksweg 53
9680 Maarkedal
Tel. +32 55 23 00 00
Fax +32 55 31 00 95
nico.spele...@carfac.com
www.carfac.be>
[cid:image001.jpg@01D11613.C23F19C0][cid:image002.jpg@01D11613.C23F19C0] [cid:image003.jpg@01D11613.C23F19C0]


[Beschrijving: Beschrijving: Beschrijving: CarfacAS
(klein)]

[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]



[firebird-support] FB 3.0, how to get IDENTITY of last inserted row

2016-04-27 Thread 'Zoran' zoran...@gmail.com [firebird-support]
Hello

 

In FB 2.5 I am using 

 

insert into MyTable (col1, col2) values(val1, val2) returning Id

 

where Id is autoinc column (sequence generator + before insert trigger).

 

How do I do it in FB 3.0? It doesn't like "returning Id". It displays this
error: SQLDA error. Wrong number of parameters (expected 1, got 0)

 

I have Id defined as IDENTITY. Can I get INDENTITY for the last inserted row
without using SELECT GEN_ID(generator-name, 0) AS ID FROM RDB$DATABASE ?

 

I am trying this with Firebird Maestro 15.11.0.1 (supports FB 3) on Win
Server 2012 R2. With FB 2.5 all works as expected.

 

 

Thank you.

Zoran

 



RE: [firebird-support] firebird and transaction behaviour questions

2016-02-23 Thread 'Zoran' zoran...@gmail.com [firebird-support]
Tim,

 

Ah. thank you for clarifying this. I always try to do select for a report in
one select statement with joints etc. In the scenario you described below -
yes, we need a transaction.

 

Tnx.

 

Regards

Zoran

 

 

From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] 
Sent: Tuesday, February 23, 2016 10:43 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] firebird and transaction behaviour questions

 

  

On 23/02/2016 15:38, 'Zoran' zoran...@gmail.com 
[firebird-support] wrote:

  


23.02.2016 16:03, 'Zoran' zoran...@gmail.com 
[firebird-support] wrote:
>> Why would you use transaction for select statements?

> For data consistency. People like consistent data in reports.

If other clients are using transactions properly (when updating multiple
rows), database should be in a stable state. 


In the following sequence:

- you do a SELECT
- some other transaction commits
- you do another SELECT
- you build a report with the results from the two SELECTs

you can get inconsistent results in your report unless your two SELECTs are
in a transaction.




Using transactions when not needed (in my opinion - and I am no expert in
Firebird) just add an overhead to the server.

If the database designers have chosen that everything is always done in a
transaction then that's how it works - there's no overhead because there's
no concept of doing anything without a transaction.



-- 
Tim Ward





[Non-text portions of this message have been removed]



RE: [firebird-support] firebird and transaction behaviour questions

2016-02-23 Thread 'Zoran' zoran...@gmail.com [firebird-support]
 

 

From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] 
Sent: Tuesday, February 23, 2016 10:15 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] firebird and transaction behaviour questions

 

  

Hi,

>>> That's true, but according to ODBC specs driver should start transaction
automatically as needed.

>>> Is this the case if you are doing reads only?

>>> Yes.

>>Why would you use transaction for select statements?



>To isolate statements from uncommitted changes.

>http://www.slideshare.net/ibsurgeon/3-how-transactionswork

 

Hi Alexey

I am not a Firebird expert by any means, but how you get uncommitted data in
your select statement? I tried to read your article, but it is still unclear
to me.

If other clients use transactions to update database, how is it possible to
get uncommitted data when I run a select statement?

Regards

Zoran



RE: [firebird-support] firebird and transaction behaviour questions

2016-02-23 Thread 'Zoran' zoran...@gmail.com [firebird-support]


-Original Message-
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] 
Sent: Tuesday, February 23, 2016 10:14 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] firebird and transaction behaviour questions

23.02.2016 16:03, 'Zoran' zoran...@gmail.com [firebird-support] wrote:
>> Why would you use transaction for select statements?

>   For data consistency. People like consistent data in reports.


If other clients are using transactions properly (when updating multiple
rows), database should be in a stable state. 

Using transactions when not needed (in my opinion - and I am no expert in
Firebird) just add an overhead to the server.


>> No. For ONE row at the time you don't need a transaction. If you are 
>> changing multiple rows, then you do need to wrap it into transaction.

>   ODBC standard writers had different opinion.


I don't use ODBC. Probably ODBC writers have a good reason :)




RE: [firebird-support] firebird and transaction behaviour questions

2016-02-23 Thread 'Zoran' zoran...@gmail.com [firebird-support]


-Original Message-
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] 
Sent: Tuesday, February 23, 2016 9:36 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] firebird and transaction behaviour questions

23.02.2016 15:02, heineferre...@yahoo.com [firebird-support] wrote:
>> A friend of mine said that everything in firebird MUST be done inside a
transaction.

>   That's true, but according to ODBC specs driver should start transaction
automatically as needed.

>> Is this the case if you are doing reads only?

>   Yes.


Why would you use transaction for select statements?


>> Is this the case if you are only inserting, updating or deleting ONE
record at a time?

>   Yes. In this case transaction can be committed automatically according
to ODBC "autocommit" attribute..


No. For ONE row at the time you don't need a transaction. If you are
changing multiple rows, then you do need to wrap it into transaction.


>> I can understand if you are writing changes effecting multiple records.
>> Do you have to do transactions while doing DDL changes?

>   Yes. See above.




RE: [firebird-support] Need Support to connect to the database

2016-01-07 Thread 'Zoran' zoran...@gmail.com [firebird-support]
Hi Jianbo

 

Once I had the same error message and it turned out that my x32 program was 
using x64 fbclient.dll because it was first in the path (x32 fbclient.dll was 
further down the path). After I fixed that, all was ok. Sorry, no other ideas… 
:(

 

Zoran

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Thursday, January 7, 2016 8:54 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Need Support to connect to the database

 

  

Hi Zoran,

Thanks for you reply,

I have checked the fbclient.dll file, it is x32 and my OS is windows 7 x32.

Do you have any other ideas on this problem?

Thanks,

Jianbo

At 2016/1/7 21:31, 'Zoran' zoran...@gmail.com   
[firebird-support]:

  

Check if fbclient.dll is has the right bitness (x32 or x64).

 

 

From:   
firebird-support@yahoogroups.com [  
mailto:firebird-support@yahoogroups.com] 
Sent: Wednesday, January 6, 2016 8:50 PM
To:   firebird-support@yahoogroups.com
Cc: Rees Theo   

Subject: [firebird-support] Need Support to connect to the database

 

  

 

Hi,

I'm working on a project that need to connect to the database file, but I got 
an error message,

"Statement failed, SQLCODE = -902
Your user name and password are not defined. Ask your database administrator to 
set up a Firebird login."

The database file is used in an application named GP Complete, I have asked the 
owner, he told me that I may need to ask support from Firebird, he didn't 
change the default password "sysdba/masterkey".

Could anyone let me know how can I connect to the database file?

Thanks

 

 





[Non-text portions of this message have been removed]