|
-
Oct 22nd, 2003, 04:53 PM
#1
Thread Starter
Fanatic Member
Get Linked Tables file path ***RESOLVED
Access may have linked tables.
I want to determine what the linked tables address or file path is from my VB application. Any idea how I could get this?
Last edited by Avatarp; Oct 23rd, 2003 at 11:53 AM.
-
Oct 22nd, 2003, 05:46 PM
#2
Hyperactive Member
if your using DAO then the TableDef object has two important properties.
Connect: is the path to whatever file your mdb is linked to usally it looks like this ";Database =C:\Folder\Filename.mdb".
SourceTableName: this is table name within the linked database.
-
Oct 23rd, 2003, 10:47 AM
#3
Thread Starter
Fanatic Member
I'm not using DAO...
I am using the OpenRecordset on a opened database:
Code:
Dim dbMyDB As Database
Dim rsMyRS As Recordset
Set dbMyDB = OpenDatabase(frmEOIFINDERMAIN.txtReportsManager)
Set rsMyRS = dbMyDB.OpenRecordset("Directories", dbOpenDynaset)
Could you give me an example of how to us DAO to get what I need? Thanks frigginjerk
-
Oct 23rd, 2003, 11:52 AM
#4
Thread Starter
Fanatic Member
Solved it...
Code:
Dim dbMyDB As Database
Dim rsMyRS As Recordset
Dim tbdef As TableDef
Set dbMyDB = OpenDatabase(frmEOIFINDERMAIN.txtReportsManager)
Set rsMyRS = dbMyDB.OpenRecordset("Directories", dbOpenDynaset)
Set tbdef = dbMyDB.TableDefs("BrokerCash")
LinkedTableString = tbdef.Connect
LinkedTableString = Mid(LinkedTableString, 11, Len(LinkedTableString))
frmEOIFINDERMAIN.txtLinkedTable.Text = LinkedTableString
This works grat for me. I us the Mid function to trim out the ";DATABASE=" character from the string
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|