By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,072 Members | 1,151 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,072 IT Pros & Developers. It's quick & easy.

Recordset Type in ADP

P: n/a
Does changing the Recordset Type property for a form in an Access ADP
have any effect on possible record locking?

I have a continuous form that is bound to a table but I don't want it
editable, so if I make it Snapshot instead of updateable Snapshot will
this in any way improve performance and reduce/remove record locking?

Thanks,
lq

Nov 17 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
On 16 Nov 2005 17:21:13 -0800, "Lauren Quantrell"
<la*************@hotmail.com> wrote:

Yes.
You'd always want to choose the simplest recordset possible for your
form. Same when opening a recordset in code. A sloppy recordset breeds
bugs.

-Tom.

Does changing the Recordset Type property for a form in an Access ADP
have any effect on possible record locking?

I have a continuous form that is bound to a table but I don't want it
editable, so if I make it Snapshot instead of updateable Snapshot will
this in any way improve performance and reduce/remove record locking?

Thanks,
lq


Nov 17 '05 #2

P: n/a
Tom,
Thanks for the info.

Generally, I open recordsets like this:

Dim RS As ADODB.Recordset, mySP As String, myID as Long
myID = Me.SomeUniqueID
mySP = "dbo.sprocName"
Set RS = CurrentProject.Connection.Execute("EXEC " & mySP & " " & myID)
If Not RS.BOF And Not RS.EOF Then
'Extract some RS("ColumnName") value or do something else really
valuable to mankind
End If

Is there a way to specify a non-dynamic recordset doing it this way?

lq

Nov 17 '05 #3

P: n/a
On 16 Nov 2005 21:47:12 -0800, "Lauren Quantrell"
<la*************@hotmail.com> wrote:
Tom,
Thanks for the info.

Generally, I open recordsets like this:

Dim RS As ADODB.Recordset, mySP As String, myID as Long
myID = Me.SomeUniqueID
mySP = "dbo.sprocName"
Set RS = CurrentProject.Connection.Execute("EXEC " & mySP & " " & myID)
If Not RS.BOF And Not RS.EOF Then
'Extract some RS("ColumnName") value or do something else really
valuable to mankind
End If

Is there a way to specify a non-dynamic recordset doing it this way?

lq


My understanding was that doing it that way would always give you a snapshot.
Nov 17 '05 #4

P: n/a
Is there a better way I should be doing this?

Nov 17 '05 #5

P: n/a
On 16 Nov 2005 21:57:38 -0800, "Lauren Quantrell"
<la*************@hotmail.com> wrote:
Is there a better way I should be doing this?


That depends - when you want a snapshot, I think that's a perfectly good way
to do it. If you need to specify the recordset behavior, create a new
recordset object, initialize its properties the way you want them, then use
the Open method of the recordset to open it.
Nov 17 '05 #6

P: n/a
On 16 Nov 2005 21:57:38 -0800, "Lauren Quantrell"
<la*************@hotmail.com> wrote:

When using ADO I always use a Command object, set my parameters and
use rs.Open to get the recordset. The Open method allows you to
specify in detail what kind of recordset you need. Of course I have
this code nicely encapsulated in a class, so I don't have to write the
repetitive parts over and over again.

-Tom.

Is there a better way I should be doing this?


Nov 17 '05 #7

P: n/a
But if I only want a snapshot, will doing it this way ... Set RS =
CurrentProject.Connection.Execute("EXEC " & mySP & " " & myID)
... accomplish that without issue?

Nov 17 '05 #8

P: n/a
But if I only want a snapshot, will doing it this way ... Set RS =
CurrentProject.Connection.Execute("EXEC " & mySP & " " & myID)
... accomplish that without issue?

Nov 17 '05 #9

P: n/a
On 17 Nov 2005 06:38:04 -0800, "Lauren Quantrell"
<la*************@hotmail.com> wrote:

Technically there is no snapshot in ADO. Perhaps you could inspect
rs.CursorType.

-Tom.

But if I only want a snapshot, will doing it this way ... Set RS =
CurrentProject.Connection.Execute("EXEC " & mySP & " " & myID)
... accomplish that without issue?


Nov 18 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.