A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Database name added to link tables!



 
 
Thread Tools Display Modes
  #1  
Old May 13th, 2010, 03:46 PM posted to microsoft.public.access.gettingstarted
Lee7763
external usenet poster
 
Posts: 1
Default Database name added to link tables!

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

  #2  
Old May 13th, 2010, 06:29 PM posted to microsoft.public.access.gettingstarted
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default Database name added to link tables!

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" wrote in message
...
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



 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:41 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 OfficeFrustration.
The comments are property of their posters.