Depends.
In my testing, which I'm sure is not as extensive as some others, this was
the fastest way to access data over a WAN:
Assuming a local table and a matching server table, using Access here:
---------------------
Dim f As Integer
Dim cnxn As ADODB.Connection
Dim rS As ADODB.Recordset
Dim rL As ADODB.Recordset
Set cnxn = New ADODB.Connection
Set rS = New ADODB.Recordset ' Server
Set rL = New ADODB.Recordset ' Local
rL.Open "table1", CurrentProject.Connection, _
adOpenKeyset, adLockOptimistic, adCmdTable
cnxn.Provider = "Microsoft.Jet.OLEDB.4.0" ' Access
cnxn.Open "Data Source=" & ' Server
rS.Open "SELECT * FROM table1 WHERE table1.ssn=' & Me.txtSSN & " ' ", _
cnxn, adOpenForwardOnly, adLockReadOnly, adCmdText
Do While Not rS.EOF
rL.AddNew
For f = 0 To rL.Fields.count - 1
rL.Fields(f) = rS.Fields(f)
Next f
rL.Update
rS.MoveNext
Loop
rS.Close
rL.Close
cnxn.Close
----------------
Of course, if just retrieving a value, not storing it for further use, then
a simple SELECT works faster, but for most of my use, I was copying a client
record to the local tables to manipulate, then saving back to the server at
the end.
Passing parameters to a query/stored procedure on the backend .mdb sped up
large queries; I assume that it would be even faster with SQL Server.
Of course, I made every effort to not download text fields, using every
locally stored lookup table I could.
--
Darryl Kerkeslager
<Matt.W.Stephens@gmail.comwrote
Quote:
I have created a form with search criteria that reduces the amount of
records significantly. Usually searching by Social Security Number so
at most 3 or 4 records would be available. I am doing this using a
dynamic Select Statement changing my WHERE clause based on the criteria
selected. But it is my understanding that by using a Select and not a
Stored Procedure the whole recordset set is being filtered on the user
side and not on the SQL server. Is this correct?