Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Database Design / April 2005

Tip: Looking for answers? Try searching our database.

Splitting database

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Pierre - 16 Apr 2005 16:36 GMT
Hi all,

I have an apllication that i want to split in front end and back end.

Once the operation is completed will the application still work without
changing the code?

Is there a check list of things to do after splitting?

I think some recordset seek wont work on linked db.

Any help appreciated on step to follow after splitting FE and BE

regards,

pierre
Allen Browne - 16 Apr 2005 17:00 GMT
Yes, using the Seek method on a DAO Recordset will not work after splitting,
because the Recordset of an attached table is dbOpenDynaset, whereas the
Recordset of a local table defaults to dbOpenTable. The simplest way to work
around this is to explicitly open a dbOpenDynaset in your code, and then it
will work correctly after split, i.e.:
   Set rs = db.OpenRecordset("Table1", dbOpenDynaset")
Better still, use a SQL statement so the recordset contains only the fields
and records you really need, and is sorted as desired. This is generally a
more efficient approach than Seek.

The other important point is to check that the data is available when the
database starts. After splitting, it is always possible that the data is no
longer in the same folder, or the server name has changed, and you need to
reconnect. For an example of how to do that, see the refresh module in
solutions.mdb, downloadable from:
http://msdn.microsoft.com/library/officedev/bapp2000/mdbdownload.htm

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Hi all,
>
[quoted text clipped - 12 lines]
>
> pierre
Duane Hookom - 16 Apr 2005 19:15 GMT
You can perform a seek on a linked table by setting your db object to the
backend mdb file rather than the CurrentDB.
Sub FindWithSeek()
   Dim db As DAO.Database
   Dim rs As DAO.Recordset
   Dim strBEmdb As String
   Dim strBETable As String
   strBETable = "doc_tblObjects"    'linked table name
   strBEmdb = Mid(CurrentDb.TableDefs(strBETable).Connect, 11)
   Set db = OpenDatabase(strBEmdb)
   Set rs = db.OpenRecordset(strBETable, dbOpenTable)
   rs.Index = "PrimaryKey"  'Name of the Primary Key index
   rs.Seek "=", 480
   Debug.Print rs!ID, rs!ParentID, rs![Name]
   rs.Close
   Set rs = Nothing
   Set db = Nothing
End Sub

Signature

Duane Hookom
MS Access MVP

> Yes, using the Seek method on a DAO Recordset will not work after
> splitting, because the Recordset of an attached table is dbOpenDynaset,
[quoted text clipped - 29 lines]
>>
>> pierre
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.