Updateable Pass Through Queries

We recently migrated our Access 2002 backend to SQLserver and attempting to isolate performance bottlenecks. Most of the forms we provide for customers to do data entry have a "conventional" SELECT query as it's recordsource. I've been told these queries should be Pass Through queries instead but then I've also been told you can't use a Pass Through query on a data entry/edit form.

Can someone educate me here on this before we spend a lot of time doing something that might not be correct.
ACCESSIBLESOLUTIONSAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SimonLarsenCommented:
Pass through is read only. But quick.

Most of the time if you use a passthrough to get data you then write a series of functions for updates and inserts.

This is probably the best way to go with sql anyway. Nice and fast and low overhead.

If you are looking at data entry they aren't even looking at old data though are they? Hence a passthrough is a waste of time (read only of old data). You just want to look at a nice quick ADO function for inserts....

Quick example below for one of mine (if you are really lazy and have an identifiable naming convention I can also give you the sql code I use to autogenerate all the vba required for the insert, update, delete and passthrough rewrite modules ;):

Function ap_iDGroupThing(LGroup_FK, ThingName) As Integer
        On Error GoTo ErrHandler
       
        Dim cmd1 As New ADODB.Command
        cmd1.CommandType = adCmdStoredProc
        cmd1.CommandText = "ap_iDGroupThing"
        cmd1.Parameters.Append cmd1.CreateParameter("ret", adInteger, adParamReturnValue)
        cmd1.Parameters.Append cmd1.CreateParameter("LGroup_FK", adInteger, adParamInput, , LGroup_FK)
        cmd1.Parameters.Append cmd1.CreateParameter("ThingName", adVarChar, adParamInput, 128, ThingName)
       
        cmd1.ActiveConnection = Util.ocon
        cmd1.Execute
        ap_iDGroupThing = cmd1.Parameters("ret")
       
        Exit Function
       
ErrHandler:
            Select Case Err.Number
                Case Else
                    MsgBox "Error in ap_iDGroupThing: " & Err.Number & vbCrLf & Err.Description
            End Select
           
        ap_iDGroupThing = -999
       
        End Function


0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.