By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,640 Members | 2,094 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,640 IT Pros & Developers. It's quick & easy.

VBA - Linking Problem

P: 2
Hi,

I am trying to link oracle tables through VBA. Using the following code:

Dim db As DATABASE
Dim tdf As TableDef
Dim strConnect As String
Dim strTable As String
strTable = "TableName"
Set db = CurrentDb()
Set tdf = db.CreateTableDef(strTable)
tdf.SourceTableName = strTable
strConnect = "ODBC;DSN=<dsnname>;SERVER=<server>;PWD=<pwd>;UID= <uid>"
tdf.Connect = strConnect
db.TableDefs.Append tdf
db.Close
End Sub

I get the following error : "There are several tables with that name. Please specify owner in the format 'owner.table'. (Error 3298)".

I have tried specifying <uid>.tablename.....but it doesnt work....

Any suggestions..
Apr 17 '07 #1
Share this Question
Share on Google+
3 Replies


Denburt
Expert 100+
P: 1,356
Where I currently work they name the Oracle tables Something.Something and MS Access converts this to Something_Something so if i look at the linked table I see one thing but if I highlight the link and hover over it with the mouse I can see in the tips area that lights up and shows the complete connection and that shows the table name as it should (Something.Something).

Do you think this could be the issue? I am sure you will find quite a few issues when trying to tie into and work with Oracle, although I have had much success.
Apr 17 '07 #2

P: 2
gave the source table name as <uid>.<tablename> and it worked...thanks.
Apr 19 '07 #3

Denburt
Expert 100+
P: 1,356
Awesome glad i could help. :)
Apr 19 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.