| Subject |
Re: ADORowset |
| From |
Mustansir Ghor <mustan31@hotmail.com> |
| Date |
Fri, 30 Oct 2020 14:33:06 -0400 |
| Newsgroups |
dbase.getting-started |
Dear Akshat
Thank you for the reply.
1. which will be more faster a requery() for parameter query or applylocate()
2. Yes MariaDB has lock in feature, However a transaction that it referred to was unclear to me.
3. I found a statement TRUNCATE TABLE tbl_name which is similar to Zap.
As you said requery() it will refer to same table. But my doubt is for a multiuser if the same form being open by many users, then will this one table cater for all users
Regards
Mustansir
Akshat Kapoor Wrote:
> Good Evening Mustansir,
>
> > The rowset that i have been using so far with BDE had properties that with ADOrowset needs to be redesigned. Among them are
> >
> > 1. Indexname - This had main advantage of using with findkey() method. Alternatively the solution will be to use parameter query.
> No parameter query is not that necessary.
> form.invedatamodule1.inve.rowset.applylocate("recno ="+rapid) Works
> perfectly well.
>
> form.invedatamodule1.inve.rowset.applylocate("Name ='"+form.name.value
> +"'" ) will also work.
>
>
> > 2. lockset() - This was mainly used to assigned document no may be Receipt no for a shared table so that a number can not be assigned to multi users who may try to insert records simultaneously. I wonder how this can be handled in ADOrowset
>
> Nothing that I am aware of. With executesql being used to update this
> should not have much effect. You will have to search for locks being
> built into MariaDB. Try
> https://mariadb.com/kb/en/lock-in-share-mode/#:~:text=When%20LOCK%20IN%20SHARE%20MODE,until%20your%20transaction%20is%20committed.
>
> or try googling "Locks in MariaDB"
> >
> > 3. I understand the concept of temporary tables which can be alternative solution to local tables that required to emptied for a new form that records entries. While I design form, I create a query and datalink to grid. Then on form open I deactivate the query, empty the table and activate the query again. So if I apply same procedure for ADOquery will it refer to same table that I will create as temporarily table when I open the form.
>
> You do not need to deactivate query to empty the table. executesql()
> will update the table and requery() will refresh the rowset.
>
> As for the same table being accessed or not, You will be accessing the
> same table till one or more of the following occur
> 1. You delete the table and recreate it.
> 2. You set active = false for adodatabase object.
> 3. Connection to the server is lost.
>
> Point 3 is not under your control but 1 & 2 are definitely under your
> control.
>
> Regards
> Akshat
|
|