C
Corey-g via AccessMonster.com
Hi all,
I have been working on this application for some time now (part time as of
late), and I seem to be getting no-where. I have read tons of posts
regarding linking vs. pass through, DNS-less connections, re-linking via code,
etc..., but I am still having issues with getting my head around it all.
What I really think I need is a mentor, but I'm not sure where to find one.
Anyways, I have been trying to write my own linking routine that uses a local
Access table to hold the Oracle table name and the local name I want for that
table. But I haven't been able to make the linking work.
I have been successful at creating an ADO dns-less connection to the Oracle
back-end, and also using updatable recordsets, etc... (But no idea how to
create a 'master - detail' data entry screen which is why I'm looking at
linking).
I am unable to touch the registry, so the one link to I've seen many time
(Dev Ashish's "Relink ODBC tables from code" on Access Web) won't work for me,
and I have tried to understand what Doug Steele is doing in his code and
alter to work for me to no avail. I'm now getting an MS Access '3170 - Could
not find installable ISAM. DAO.TableDef'
If anyone wouldn't mind discussing what I'm trying to accomplish and help
point me in the right direction, I would be more than grateful.
The current code looks like this:
Thanks for your time,
Corey
I have been working on this application for some time now (part time as of
late), and I seem to be getting no-where. I have read tons of posts
regarding linking vs. pass through, DNS-less connections, re-linking via code,
etc..., but I am still having issues with getting my head around it all.
What I really think I need is a mentor, but I'm not sure where to find one.
Anyways, I have been trying to write my own linking routine that uses a local
Access table to hold the Oracle table name and the local name I want for that
table. But I haven't been able to make the linking work.
I have been successful at creating an ADO dns-less connection to the Oracle
back-end, and also using updatable recordsets, etc... (But no idea how to
create a 'master - detail' data entry screen which is why I'm looking at
linking).
I am unable to touch the registry, so the one link to I've seen many time
(Dev Ashish's "Relink ODBC tables from code" on Access Web) won't work for me,
and I have tried to understand what Doug Steele is doing in his code and
alter to work for me to no avail. I'm now getting an MS Access '3170 - Could
not find installable ISAM. DAO.TableDef'
If anyone wouldn't mind discussing what I'm trying to accomplish and help
point me in the right direction, I would be more than grateful.
The current code looks like this:
Code:
Public Sub Link()
Dim db As DAO.Database
Dim tblDef As DAO.TableDef
Dim rs As DAO.Recordset
Set db = DBEngine.Workspaces(0).Databases(0)
Set rs = db.OpenRecordset("Select * from tbl_ODBC_Tables")
Do While Not rs.EOF
Set tblDef = db.CreateTableDef(rs("LocalTableName").Value)
With tblDef
.SourceTableName = rs("OracleTableName").Value
.Connect = "Provider=OraOLEDB.Oracle;Data Source=XE;User Id=" &
strUSER_NAME & ";Password=" & strPWD & ";"
End With
db.TableDefs.Append tblDef
Loop
End Sub
Thanks for your time,
Corey