Multiple Users - Many other questions

Forum related to Firebird

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
sfxcc
Senior Boarder
Senior Boarder
Posts: 95
Joined: 13.05.2010, 18:48

Multiple Users - Many other questions

Post by sfxcc »

I ve done a basic test use ztable.

2 computers,
Computer A , Computer B.


So when i insert on Computer A a record on a ztable i send to the FB but computer B is not notified ( even i do ztable.refresh ).

1 - So, do u have any idea how to do this (without close the table).
2 - How can i send a image, or data block to the fb
3 - Does the fb have triger inside it self( it call a stored procedure on events) or it is on TIBEventAlerter ( on the client).

4 - Can u give an example of a Stored Procedure. ex : ( get max of a integer field add +1 and return to the client). ( delphi and sql example (for sure we understand))

5 - Does Fb have table view ( if so what this does).

6 - What intressant things does fb or zeus ??

If u think is interesting so shoot it... ( Is the best way we all learn)

Thanks you very much..
trupka
Expert Boarder
Expert Boarder
Posts: 140
Joined: 26.08.2007, 22:10

Re: Multiple Users - Many other questions

Post by trupka »

sfxcc wrote: So when i insert on Computer A a record on a ztable i send to the FB but computer B is not notified ( even i do ztable.refresh ).
People who start to program C/S often asks that question - in short:
Computer B have no idea that table is changed unless you use some NOTIFY (see TZIBAlerter component). Even then, B won't see any data changes until A commits transaction. If you want that other comps/apps be notified on database changes you must develop notification mechanism yourself (but you rarely, if ever, need this).
1 - So, do u have any idea how to do this (without close the table).
Use TZIbAlerter. Table.Refresh should be sufficient, but again - think twice do you realy need notifications- is it realy important that person B see in realtime that person A changed some data in database?
BTW, avoid Table components.
2 - How can i send a image, or data block to the fb
Search for "BLOB" in manual.
3 - Does the fb have triger inside it self( it call a stored procedure on events) or it is on TIBEventAlerter ( on the client).
You need to write trigger / sp which will notify tibeventalerter.
4 - Can u give an example of a Stored Procedure. ex : ( get max of a integer field add +1 and return to the client). ( delphi and sql example (for sure we understand))
Please, see delphi demos first, particularly those that works with IBX components. Very similar to ZEOSDBO... You can find some examples in "User contributions" forum.
5 - Does Fb have table view ( if so what this does).
Views are a way to create a customized version of the underlying
tables that display only the part of table data. Please consult Firebird / Interbase docs for details. You can find those on: http://www.firebirdsql.org/index.php?op=doc&id=userdoc
sfxcc
Senior Boarder
Senior Boarder
Posts: 95
Joined: 13.05.2010, 18:48

Questions

Post by sfxcc »

Thank's trupka.

Your information help me a lot.

I still have many questions on this.

Ok i created a triger for a teste table.
Created a Generator : Create generator testegen
is working but....

usig the IBO dbgrid--> i enter a record with a primary key he asks for a value for IDA ( is normal is a primary so). i just give 0 for generator work. (is working but..)

The problem is it doesnt retrieve the value .. the grid stays with the value i entered, "0" value , only if i refresh is retrives the generaded value.

There is any way i can get this result on the update insert without refresh the table / Record ....


Thanks,
Post Reply