Page 1 of 1

Multiple Users - Many other questions

Posted: 16.05.2010, 14:00
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..

Re: Multiple Users - Many other questions

Posted: 16.05.2010, 15:54
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

Questions

Posted: 16.05.2010, 21:26
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,