Access 2K3, Terminal Server, and Oracle BE - Anyone able to help?

  • Thread starter Thread starter Corey-g via AccessMonster.com
  • Start date Start date
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:
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
 
I found another post by Doug that suggested that all connection strings
require "ODBC;" before the rest of the info. But since adding that in, I am
prompted for a DSN ( the "Select Data Source" window pops up).

So, I guess I'm still missing something...

Thanks again,

Corey
 
Hi Corey

Your code seems OK apart from the connect string that you are supplying

If you want a dsn-less connection then it should look something like:

"ODBC;Driver={Microsoft ODBC for Oracle};Server=server;"

Where server is the name of your server as defined in your local tnsnames.ora
file

Hope this helps

Dom
 

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

Back
Top