| Subject |
Re: ADORowset |
| From |
Akshat Kapoor <akshat.kapoor@kapoorsons.in> |
| Date |
Fri, 30 Oct 2020 22:49:15 +0530 |
| Newsgroups |
dbase.getting-started |
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
|
|