Board index » delphi » Refresh really doesn't work right?

Refresh really doesn't work right?

1st)

So what can I do to re-read data from server, since the app is running on a
network env.?

I have participation in a local newsgroup here in my country (Brazil) and
everyone is complaining about this!!

Please give us a light!!!!

2nd)
How can make a good use of transaction ? I read at Jeff's post behind, that
is a good put a transaction on each form, but and the tables ? I work w/ a
datamodule that holds all tables (IBQueries/UPSql/SProc) how can I do then ?

Really Thanks

--
Alexandre

 

Re:Refresh really doesn't work right?


I'm pretty new to IBX and IB6, but here are my suggestions until the gurus
step in:

1) To refresh: Close and Open your query.

2) I've set up my app like this. If a query is only used for one particular
form, I've placed it on the form (I usually have one transaction per form).
If a query is to be used by lots of different forms it goes into a
datamodule.
Now, if you want to use the 'one transaction per form' strategy and you've
got all your queries in a datamodule, you might be able to do this:

Suppose:
Datamodule dm1 has query1, and Form form1 has Transaction trans1
Now in form1 you could do this :

dm1->query1->Transaction = trans1;
trans1->StartTransaction;
.
dm1->query1->Open()  /* Do some sql with query1 */
.
trans1->Commit();

Regards,
Martin Lohse

Quote
"Alexandre" <ags.soluc...@uol.com.br> wrote in message

news:8k8ipr$gqo$1@linux.mers.com...
Quote
> 1st)

> So what can I do to re-read data from server, since the app is running on
a
> network env.?

> I have participation in a local newsgroup here in my country (Brazil) and
> everyone is complaining about this!!

> Please give us a light!!!!

> 2nd)

> How can make a good use of transaction ? I read at Jeff's post behind,
that
> is a good put a transaction on each form, but and the tables ? I work w/ a
> datamodule that holds all tables (IBQueries/UPSql/SProc) how can I do then
?

> Really Thanks

> --
> Alexandre

Re:Refresh really doesn't work right?


Have you set your transaction level to: Read Commited? If you haven't, try
to right click on your TIBTransaction, then choose 'Transation Editor'.
Select Transaction Properties to: 'Read Committed'. Default = 'Snapshot'.

Regards,
Sachli

Quote
Alexandre <ags.soluc...@uol.com.br> wrote in message

news:8k8ipr$gqo$1@linux.mers.com...
Quote
> 1st)

> So what can I do to re-read data from server, since the app is running on
a
> network env.?

> I have participation in a local newsgroup here in my country (Brazil) and
> everyone is complaining about this!!

> Please give us a light!!!!

> 2nd)

> How can make a good use of transaction ? I read at Jeff's post behind,
that
> is a good put a transaction on each form, but and the tables ? I work w/ a
> datamodule that holds all tables (IBQueries/UPSql/SProc) how can I do then
?

> Really Thanks

> --
> Alexandre

Re:Refresh really doesn't work right?


Quote
"Sachli" <ag...@cpssoft.com> wrote in message

news:8kcf54$bde6@bornews.borland.com...
Quote
> Have you set your transaction level to: Read Commited? If you haven't, try
> to right click on your TIBTransaction, then choose 'Transation Editor'.
> Select Transaction Properties to: 'Read Committed'. Default = 'Snapshot'.

> Regards,
> Sachli

No matter what the transaction isolation level, to refresh the query you
will need to open and close it.

Refresh only refreshes the current record.

Steven Tolleneer

Other Threads