MS Access: Creating a linked table in design guide view does not show the tables to link to? - oracle

In MS Access 2010 I am trying to create a linked table to an Oracle table.
When I use the traditional way of doing it via the MS Access menus:
External Data > ODBC Database > Link to the data by creating a linked
table
I cannot see the tables on my Oracle server that I should be able to choose from. The form is empty, even though I know there are many tables at my server.
What is the problem here?
Could it be that the ODBC connection that I'm forced to use is System DSN inside the "ODBC Data Source Administrator" overview under control panel.
NB: The connection is working in other programs, so that is not the problem.
PS: I can off course do it via VBA code instead, which can be done as shown here:
Template code taken from here: https://www.techonthenet.com/access/modules/link_table.php
Here the template code from the link:
DoCmd.TransferDatabase acLink, "ODBC Database", "ODBC;DSN=AAAA;UID=BBBB;PWD=DDDD;SERVER=CCCC", acTable, "schema.table_name", "Access_table_name", False, False
And here the comments from the link:
Please note that you'll need to customize the above line of code, so
that:
AAAA is the name of the ODBC Data Source that you set up. BBBB is the
user name that you will use to log into Oracle. CCCC is the name of
your Oracle server. DDDD is the password that you will use to log into
Oracle. schema.table_name is the table in Oracle that you wish to link
to. For example, "collect.suppliers". Access_table_name is the name
that you'd like Access to assign to the linked table. For example,
"suppliers".

When using the menus, you need to pre-specify a database in the DSN (Dbq parameter in a connection string).
If you don't pre-specify a database, MS Access won't know in which database to look for tables, and it won't do all or all it has access to, so it just does none.

Make sure that the ODBC driver matches your Access version
32 bit Access <--> 32 bit ODBC
64 bit Access <--> 64 bit ODBC

You have some good comments here. If you launch the ODBC panel from the control panel, it will launch the x64 bit version of the ODBC manager. However, most versions of Access are x32 bits.
The most simple way to ensure that your using the correct bit size ODBC manager is to let Access launch the ODBC panel for you. (and it often helps if you right click on your access shortcut and choose run as administrator.
As others noted, when you setup the DSN, do two things:
Make sure during the creating of the connection, you select the database (the default is usually system and that will show a whole bunch of system tables, but none of the ones you want - you want to pick/choose your database. It should appear in the drop down.
The SQL server (not oracle) during the several panels will show this where you choose the database:
VERY important, you also want to check the "save password" box - this ONLY appears during the create of a new DSN - if you miss this, then re-linking will never prompt you for the password - so don't forget this option:
The above panel will show regardless of what ODBC you use - don't forget to check the save password.
Next up:
create a FILE DSN. The reason for this is that Access converts this to automatic to a DSN-less connection for you. That means you can move the database to other machines, or even delete the DSN you created. Access ONLY uses the DSN at link time - after that it not required (however, this advice ONLY applies to a FILE dsn - so that's what you want to create.

Related

ODBC for Oracle Connect login window won't go away if user tries to cancel (Access 2013)

I am managing a split Access database which has the front-end running locally on each user's computer (very small scale -- less than 5 users), and the back-end running on a shared network drive. However, there are a number of tables stored in an institution-wide Oracle database that we must also reference, so I have linked to them using the "Microsoft ODBC for Oracle" driver (they are linked on each front-end, not the back-end). This works well... for the most part.
If a user does not provide login credentials in the ODBC for Oracle Connect login window and instead hits "Cancel," the window closes (as expected)... but then it reopens. Repeat ad infinitum. This prevents the user from doing anything else!
How can I make it so that when a user hits "Cancel" it simply closes the window and does not link to the Oracle tables at all for this session? The Oracle tables are helpful but not essential for our workflow, so it's important that we still be able to access forms & queries even without the Oracle connection.
Unfortunately, I don't even know where to begin with this... if it is any help, I linked to the Oracle tables by going to the External Data tab, ODBC Database, Machine Data Source, then creating a new Data Source using the "Microsoft ODBC for Oracle" driver, which thankfully we all have on our individual machines. Any guidance is hugely appreciated!

Jetbrains Datagrip cannot connect sql server without specify database

i try to use Datagrip as my primary sql server query tools, bit i meet a problem that i can not move forward.
When i setup the project data source, i have to choose a Database, otherwise it will goto the default tempdb, how i can work like sql server management studio, that i can see all database list.
i have tried both jTds and Microsoft drivers, both not works.
or can i choose multi-database? i do not want to create one data source for one database.
if i connect to mysql, it works like expected.
tks
It is possible to connect without specifying the database. Just leave this field blank. After entering other settings (host, port, user, password), go to Schemas tab in Data Source properties and select all the Databases and schemas you want to work with. Then invoke Synchronize action for this Data Source in Database tool window.
DataGrip 2016.2 EAP claims to have support for showing multiple databases. See https://blog.jetbrains.com/datagrip/ and find for "Database View". Unfortunately, as of the date I'm writing this, it doesn't seem to work at all.
Unfortunately, Andrey's suggestion did not work for me.

Need help linking oracle tables in MS Access

I am having some issues connection to an oracle DB using MS Access.
If I use SQL Developer to connect to the Oracle DB I see pretty much every table and view in the DB however when I connect using MS Access I only get a selected few.
I tough it was because the user didn't have Select privileges on the tables I need so I requested the privilege and after a moth of waiting I finally got it but I still cant see the tables on the Access tool.
This is what I see on SQL Developer vs MS access. I need SFMFG.PWUI_CHAR_DEF_EXT to show on access table manager. Any help to solve this mystery is greatly appreciated.
Using Access 2010, if I select External Data ==> ODBC Database ==> Link to the datasource by creating a linked table, I get a windows dialogue of all the available datasources. When I log in to the one I want, I see the names of all the tables I am authorized to select from.
The Linked Table Manager only shows the tables for which there are existing links.

Linking Oracle tables to Access 2007 File (Performance)

I'm running into a problem while linking some tables and views present on a Oracle 11g database to a Access 2007 file.
I'm using the Oracle Client (SQORA32.DLL) version 11.02.00.03.
If the view/table returns a small amount of data, there's no problem. The problem happens when the view or the table returns a "large" amount of data. I've tried to increase the buffer size on the driver (default is 64000) to see if that happens. I've also removed the "Enable query timeout" option - otherwise I would get a "Query cancelled by user" or a "ODBC - Call Failed" error.
In order to link the tables/views, I've used the "native tool" (External Data -> ODBC Database -> Link to data source by creating a linked table).
I was wondering if I could retrieve the data from the tables/views using vba. Sometimes, I (you should read "I" as "the users") may need to update data on some tables (control tables).
Please let me know your thoughts.
EDIT: Our goal with this project was to migrate from SQL Server 2005 to Oracle 11gR2. After analyzing the behaviour of the Access files regarding the SQL Server, I've concluded that the results are showing like a "cursor" - if you scroll down on the result window, it will load more.
I think that this may be the issue because, AFAIK, Oracle (driver, maybe?) pulls everything from the DB and, only then, populates MS Access.
It's a long time after this so here goes the solution. MS access has a flag for the ODBC connection as "Treat Float as Numeric". This have made the trick.

How to prevent accessing particular database in SQL Server 2008?

I'm working on a Windows application. When I give this software to the client it is necessary to give database also? I want to lock the database of SQL Server on his computer so that he can not open that database or copy or view its schema or anything by which he can access that database.
When he tries to access that, it must ask for a password. So, what is the solution for the above?
SQL Server databases cannot be password-protected - they're not just files that get opened (like dBase or SQLite)
"normal" access control is handled via permissions and users - you can define who can see what, modify what, delete what
This does not however prevent a system admin from looking at your database schema and contents; there's really no way to prevent this, a sysadmin can also just copy the .mdf file to another server and attach it there and circumvent all your "security"
if you really must hide all of this, don't deliver a database - hide the database in your own company and provide a web-service based interface to the customer who can then call those web services to do his work - then the schema and data is under your control, but also: the customer's data is no longer under his control so he might not like that.....

Resources