Binding a form to a disconnected recordset and making it capable to update such recordset

Y

Yarik

Hello everyone,


I've got three questions, closely related to each other...


(1) After a superficial research on subject and doing some quick
experiments, the first conclusion I've come to is that binding a form
to a disconnected recordset in MS Access 2000 is imposssible. Is that
correct? Or am I just missing some "magic spell" that would make it
work?


(2) It looks like it is possible to do that in MS Access 2003, though.
At least a simple experiment like this one

Private Sub Form_Open(Cancel As Integer)

Dim rs As ADODB.Recordset

Me.RecordSource = ""

Set rs = New ADODB.Recordset
With rs
Set .ActiveConnection = CurrentProject.AccessConnection
.Source = "SELECT * FROM jobs"
.LockType = adLockOptimistic
.CursorType = adOpenKeyset
.Open
Set .ActiveConnection = Nothing <<<<<
End With

Set Me.Recordset = rs

End Sub

demonstrates that am Access 2003's form can not only display but also
update a disconnected recordset. So, I guess, my second question is:
assuming that there may be some pitfalls when binding a form to a
disconnected recordset, could anyone summarize his/her experience in
this area (for example, point out to any important quirks, if any, in
comparison with using "normal", connected recordsets)?


(3) Finally, while doing my preliminary research, I stepped upon an
interesting Microsoft's article (specific to Access 2000)

http://support.microsoft.com/kb/227053/EN-US/

and got somewhat confused by the problem reproduction code sample at
the end of this article: the article says that code sample is not
supposed to work (i.e. the form is not updateable), but when I tried
this sample with my installation of MS Access 2000, it turned out to
work perfectly. Is it possible that this "repro" fragment of the
article has been outdated (e.g. by a service pack or something), or is
it just a mistake? (Perhaps, this is a question for the Microsoft
support team - I hope someone from that team reads this forum.)

Thank you,
Yarik.
 
L

Larry Linson

Yarik said:
(Perhaps, this is a question for the Microsoft support
team - I hope someone from that team reads this forum.)

You can't count on anyone from Microsoft reading what you post in this
newsgroup. On occasion, some Microsoft employees do read and respond, but it
is not part of the job description for anyone in Microsoft (except maybe the
people who maintain the news server, I suppose), if I understand correctly.

As far as I know, and my knowledge on the subject is not vast, working with
disconnected recordsets really didn't mature until Access 2002. But, some of
that "maturity" could have been retrofitted in an Access 2000 Service Pack
or update.

Larry Linson
Microsoft Access MVP
 
A

aaron.kempf

why, oh why-- do you need to bind a form to a recordset?

set the RECORDSOURCE

don't re-invent the wheel

-Aaron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top