Hello, the MsAccess database network in the small charity that I volunteer at for is down again and has not worked as a network for over 3 weeks.
Each Network and Access consultant that we have had come into their office is offered the same contract, "They will pay the charges, if the network is usable by 5 persons for 1 week".
All the consultants have worked on folder permissions and Access security settings without any success. The data server is a Windows 2000 server and the workstations are Windows 2000 work stations.
To enable some work in their office, I have setup one of our computers as a single Data Base user server, the people trying to help me use our databases suggest that I change our back end to SQL, which should solve our problem..
What do you think?
Well now that your bring up the term "triggers", I'm curious to know, how would I benefit from using those over Access event procedures on my front-end?
Good question. Triggers run on the database server, in response to INSERTS, UPDATES, DELETES (actually a little more granualar). Since they run on the DB server rather than the client, they are much more efficient than, for example, VBA code in an AfterInsert event in Access. And they are asynchronous.
Sine they are written in Transact-SQL, they are procedural, which Access queries are not. You can include conditional logic in triggers and stored procedures, which means you can accomplish a lot more on the database server side. More efficient; faster; conditional processing; you can wrap data activities in transactions.
Let the UI be the UI, and let the data work happen in the database on a honking big server, is my philosophy. Or even a modest server. The fewer client-side recordsets used, the better.
Here's a trigger example, and one that violates 3rd normal form to boot: When a Person record in my database is inserted or updated, I have a trigger that fires that concatenates the LastName, a comma and a space, and the FirstName, and a space, and the first letter of their middle name, into a column called Person.Name. Another example would be re-calculating the total for an order when a new item is added to the order and writing it to the order table.
=[firstname] & " " & [lastname]
I'm glad I'm not the only one pondering these questions when using a SQL backend with Access.
Hopefully I have come to the right place!
I am curious regarding triggers as i have been told that you shouldn't actually use them as they slow things down. Is this the case?
Also in the example for creating a fullname, I don't have a fullname field?
We have a firstname and lastname and I use an unbound field on a formCode:=[firstname] & " " & [lastname]
or logic in VBA to concatenate it to a fullname string from the two first/last name fields.
Is it better to have SQL create data and store it using triggers, rather than doing an on the fly string concatenation operation with already available fields?
It isn't the normal thing to do as you'd be duplicating your data, I'd personally concatenate on need
But in general what bparkinson was trying to say is (according to my understanding at least), if it came down to choosing SQL Server on the Server (trigger) vs MS Acess on the Client Machine (event procedures) then go for SQL (let the big man do the tough load sort of thing)
Thanks guys. I am starting to find that triggers/SP's should only be used where appropriate.
I tried to bind an SP to my form and the app ground to a halt!
I certainly think string concatenation on the client side for basic GUI view updates, is better than SQL data transfer!
Also storing fullname requires constant updates if title,firstname,lastname changes (which is where the triggers come in) , but if you always concatenate on the fly as needed, fullname will always be correct![]()