PC Review


Reply
Thread Tools Rate Thread

Database name added to link tables!

 
 
Lee7763
Guest
Posts: n/a
 
      13th May 2010
Hi,
I am a very new Access database user.
I am using the Microsoft Access function called “Get External Data” to
create link tables to an Oracle 11 G R2 database. My problem is that Access
is adding the database name to the names of all the link tables instead of
just creating link tables with the original Oracle database name. Eg a table
on the Oracle database is called “com_user” but is created by Access as a
link table called “databasename_com_user”
Unfortunately all my automated test scripts that use the Access link tables
fail because they do not recognize the link table names.

Do you know how I can remove the database name from the link tables or even
better stop access adding the database name to the link tables when get the
external data.

Many Thanks

 
Reply With Quote
 
 
 
 
Douglas J. Steele
Guest
Posts: n/a
 
      13th May 2010
Dim db As DAO.Database
Dim tdf As DAO.TableDef

Set db = CurrentDb
For Each tdf In db.TableDefs
If Left(tdf.Name, 13) = "databasename_" Then
tdfName = Mid(tdfName, 14)
End If
Next tdf

Set tdf = Nothing
Set db = Nothing

(Don't forget to change the values 13 and 14 to correspond to the actual
string you're trying for which you're looking)

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

"Lee7763" <(E-Mail Removed)> wrote in message
news:A1C8D2B7-6CAC-4702-895F-(E-Mail Removed)...
> Hi,
> I am a very new Access database user.
> I am using the Microsoft Access function called "Get External Data" to
> create link tables to an Oracle 11 G R2 database. My problem is that
> Access
> is adding the database name to the names of all the link tables instead of
> just creating link tables with the original Oracle database name. Eg a
> table
> on the Oracle database is called "com_user" but is created by Access as a
> link table called "databasename_com_user"
> Unfortunately all my automated test scripts that use the Access link
> tables
> fail because they do not recognize the link table names.
>
> Do you know how I can remove the database name from the link tables or
> even
> better stop access adding the database name to the link tables when get
> the
> external data.
>
> Many Thanks
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot link tables in database Rinaldo Microsoft C# .NET 0 3rd Aug 2009 07:38 PM
Link 2 tables in the same database =?Utf-8?B?YnVtcGVyMzM4?= Microsoft Access 2 23rd Feb 2007 08:12 PM
Can I link 2 tables in the same database? =?Utf-8?B?bWUyanIy?= Microsoft Access 5 13th Apr 2006 11:01 AM
link .ADP to tables in more than one database? Joss Microsoft Access External Data 0 14th Feb 2005 02:11 PM
Link Tables in Database Ravi Sandhu Microsoft Access Getting Started 2 30th Jul 2004 11:00 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:41 AM.