Splitting database

P

Pierre

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
 
A

Allen Browne

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
 
D

Duane Hookom

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
 

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