Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 283
  • Last Modified:

Dynaset-Delete-Multiuser

Hi,
 My application Front-end and Attached Back-end are both on the server to be used by 25 users. My problem here is adding data through an unbound form takes about 35 seconds that used to be 10 seconds on a standalone PC (single user). I can still compromise with that but when it comes to deleting the data, it takes forever and Ctrl-Alt-Del to Endtask corrupts the db.
I am using
      openrecordset("tablename" , db_open_dynaset)
      do until...notfound
        myset.delete
      loop
 close myset
 
and searching through the table for the particular record based on a key value provided through a small form and the button on the form executes the above code. How can I speed
the Addnew method I have used on adding records (35 secs) and on myset.delete (infinity) described above.
 
Devtha
 
0
devtha
Asked:
devtha
1 Solution
 
devthaAuthor Commented:
Edited text of question
0
 
cymbolicCommented:
Use SQL Pass through and the .execute method. Create an SQL statment such as "Delete * from tblnam where <constraint clause>, then execute this sql, and let the database do the work.
0
 
devthaAuthor Commented:
Cymbolic
         I should have mentioned that I am not using SQL db server. It is just a file server and I have the tables attached.
I already tried a pass through query and it gave me a message

"You cannot use ODBC to attach an external MS Access db or ISAM
db table to your db."
Any other suggestions?
Devtha


0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
devthaAuthor Commented:
Hi cymbolic,
             I waited for your comment or but after not geeting any response I am opening this question to other experts.

Problems: adding and deleting records

    My application Front-end and Attached Back-end are both on the server to be used by 25 users. My problem here is adding data through an unbound form takes about 35 seconds
that used to be 10 seconds on a standalone PC (single user).

I used the following code to delete

  I was using openrecordset("tablename" , db_open_dynaset)
         do until...notfound
           myset.delete
         loop
    close myset
     
and searching through the table for the particular record based on a key value provided through a small form and the button on the form executes the above code. This gave me problems so
I used the wizard and let it create a button for deleting record and it is OK now.
But back to adding record using ADDnew method through an unbound form how can I speed the data entry over the network.
The Addnew method I have used on adding records takes 35 secs-45 secs.  

Devtha

0
 
peroveCommented:
devtha,
Have you tried to use transactions? (begintrans commit trans)?

perove
0
 
JeroenWCommented:
Are there different functionalities in your application? For example, I work for an insurance company which has its entire application (front end) build in Access. We migrated to SqlServer (backend) about a year and a half ago. Before that we had several different Access databases (backend): for each funtionality one and thus reducing the number of users and speeding up things.

Anyway, you should consider obtaining another backend, as even 10 seconds is way too much for a single record to be added.
For the addnew: maybe DB_APPEND_ONLY could do it.

Hope it helps,

Jeroen.
0
 
Kobe_LenjouCommented:
I'm pretty shure the problem resides with your search method.
Why don't you use the findfirst method?
0
 
nirmalaCommented:
Manipulating recordsets using VBA is slower than using corresponding SQL statements.
Try using SQL statements with (INSERT) and db.execute(SQL statement).
0
 
devthaAuthor Commented:
I never accepted Nirmalas answer. To my surprise it reveals that I did.
Devtha
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now