Hi everyone here,
I have a database application and I'm trying to optimize it, but I'm not sure if I'm doing it right.
This database will be accessed my more than 20 users simultaneously.
Initially I tried to use linked tables - I split the database, the BackEnd was on a remote comp and the 20 FEs were on the workstations-the same network domain. This solution failed right from the start, because when more than 4-5 users accessed the DB, it became EXTREMELY slow (I used bound forms with linked tables - VERY BAD IDEA !!!)
I must say that I have no possibility to use any kind of server (MSDE, SQLServer etc).
Then I thought of another solution, which I want to optimize to work as its best.
I will tell you how I want it to work, and then where I want to make the optimizations, which I'm not sure about.
The BE: I use Access for the back-end database, which will reside on a remote computer.
I don't use MsAccess user security, because I implemented my own security system - users log in with their username and password.
Then, the FE:
I use ADO recordsets. Users WILL NOT HAVE SINGLE - CONTINUOUS FORMS, no need for scrolling through recordsets with hundred records.
For view/edit/PrintPreview, the users will access ONLY ONE record at a time - and that's all. When they want to view more records, they will do a search, limited number of records will be displayed in a TABULAR - CONTINUOUS form, records which they will be able to view one by one using a SINGLE - COLUMNAR form.
I want to optimize EVERY READ/WRITE operation to DB, and to reduce their number to the minimum possible.
Having these into consideration, I thought best solution will be disconnected ADO recordsets.
My questions are the following:
1. Is there any performance difference between ADP and ACCESS databases, using them as FrontEnd, with disconnected ADO recordsets ?
2. What should I use to open a connection: ODBC with DSN or just JET ?
"With cn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "Data Source=" & strCONST_database_full_path
.Open
End With
With rs
Set .ActiveConnection = cn
.CursorLocation = adUseClient
etc etc"
3. How much does affect the db speed leaving a connection open from each FE to the BE (there will be more than 15 FEs open simultaneously) ?
... or .. is better to close the connection as soon I disconnect the recordset ? Or, should I keep a connection open, and all the recordsets should use that connection ?
4. Is there any other possibility to manage multiple user access to an AccessDB backend (which is rather a file-server than a client server).... ?
I must mention that the menu for each edited record is defined separately for each type of user - that means that every time a user opens a record, the BackEnd wil not be requested only for the record being displayed, but also an 8-joined-tables query will load the menu for that request and for that type of user. This user-level access menu is a real pain when I used these linked tables.
I'm asking all of these questions because now I'm running out of time, and I don't have enough time to learn only from mistakes. But if you have any recommandations, any useful links, that would be much appreciated. I think I need to learn more about how an AccessDB manages simultaneous ADO opened connections, and multiple batch update operations, and how a connection uses multiple opened recordsets.
Thanks in advance !
I have a database application and I'm trying to optimize it, but I'm not sure if I'm doing it right.
This database will be accessed my more than 20 users simultaneously.
Initially I tried to use linked tables - I split the database, the BackEnd was on a remote comp and the 20 FEs were on the workstations-the same network domain. This solution failed right from the start, because when more than 4-5 users accessed the DB, it became EXTREMELY slow (I used bound forms with linked tables - VERY BAD IDEA !!!)
I must say that I have no possibility to use any kind of server (MSDE, SQLServer etc).
Then I thought of another solution, which I want to optimize to work as its best.
I will tell you how I want it to work, and then where I want to make the optimizations, which I'm not sure about.
The BE: I use Access for the back-end database, which will reside on a remote computer.
I don't use MsAccess user security, because I implemented my own security system - users log in with their username and password.
Then, the FE:
I use ADO recordsets. Users WILL NOT HAVE SINGLE - CONTINUOUS FORMS, no need for scrolling through recordsets with hundred records.
For view/edit/PrintPreview, the users will access ONLY ONE record at a time - and that's all. When they want to view more records, they will do a search, limited number of records will be displayed in a TABULAR - CONTINUOUS form, records which they will be able to view one by one using a SINGLE - COLUMNAR form.
I want to optimize EVERY READ/WRITE operation to DB, and to reduce their number to the minimum possible.
Having these into consideration, I thought best solution will be disconnected ADO recordsets.
My questions are the following:
1. Is there any performance difference between ADP and ACCESS databases, using them as FrontEnd, with disconnected ADO recordsets ?
2. What should I use to open a connection: ODBC with DSN or just JET ?
"With cn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "Data Source=" & strCONST_database_full_path
.Open
End With
With rs
Set .ActiveConnection = cn
.CursorLocation = adUseClient
etc etc"
3. How much does affect the db speed leaving a connection open from each FE to the BE (there will be more than 15 FEs open simultaneously) ?
... or .. is better to close the connection as soon I disconnect the recordset ? Or, should I keep a connection open, and all the recordsets should use that connection ?
4. Is there any other possibility to manage multiple user access to an AccessDB backend (which is rather a file-server than a client server).... ?
I must mention that the menu for each edited record is defined separately for each type of user - that means that every time a user opens a record, the BackEnd wil not be requested only for the record being displayed, but also an 8-joined-tables query will load the menu for that request and for that type of user. This user-level access menu is a real pain when I used these linked tables.
I'm asking all of these questions because now I'm running out of time, and I don't have enough time to learn only from mistakes. But if you have any recommandations, any useful links, that would be much appreciated. I think I need to learn more about how an AccessDB manages simultaneous ADO opened connections, and multiple batch update operations, and how a connection uses multiple opened recordsets.
Thanks in advance !