473,287 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

#Deleted displaying for ODBC linked tables

Joe
I am using Access 2003 and are linking to an Oracle 9i ODBC datasource
(using Oracle ODBC drivers). After linking the tables in Access, I inspect
the data contained in the linked tables. For tables that involve a number
field as the primary key, the data is returned successfully. For tables
that involve a character field (e.g. CHAR(3) or VARCHAR(10)) as the primary
key, I have the correct number of rows returned, but the data displayed in
all the fields is "#Deleted". I have a colleague who does not seem to have
the same problem I do, and I have not been able to see any differences
between his machine and my machine. We use the same versions of software and
drivers. Jet is version 4.0.8618.0 on both machines

Any help in resolving this would be great.

An example follows:

In Oracle I run the following:

CREATE TABLE anzsic (
Code char(3) NOT NULL,
Descr varchar2(255) NOT NULL
);
ALTER TABLE anzsic ADD (CONSTRAINT anzsic_pk PRIMARY KEY (Code)) ;
INSERT INTO anzsic (code, descr) VALUES ('010','Agriculture, Forestry,
Fishing');
INSERT INTO anzsic (code, descr) VALUES ('020','Mining');
INSERT INTO anzsic (code, descr) VALUES ('030','Manufacturing');
INSERT INTO anzsic (code, descr) VALUES ('040','Electricity, Gas, Water');

In Access I link the tables successfully, and then double click on the
linked table "anzsic" to display the content. I have the following
returned:

CODE DESCR
=================
#Deleted #Deleted
#Deleted #Deleted
#Deleted #Deleted
#Deleted #Deleted

Thanks for any help.

Joe
Nov 13 '05 #1
7 11792
Joe wrote:
I am using Access 2003 and are linking to an Oracle 9i ODBC datasource
(using Oracle ODBC drivers). After linking the tables in Access, I inspect
the data contained in the linked tables. For tables that involve a number
field as the primary key, the data is returned successfully.


IS this the issue? I have experienced exactly this situation when an
Oracle data type will not translate across the ODBC/Jet interface. In
my case it's been largely when an App I administer has Oracle date
fields with just time and no date in them.

What I've done and counseled other users of the maintenance app I
administer to do is to create the query "gradually". This means
bringing the linked tables into the query grid, linking them and bring
down ONE field at a time. Run the query. If you get data then go back
to design and bring down ONE more field. Repeat until you get the
extremely irritating #Deleted result and you'll know the culprit.
Construct queries omitting the incompatible field(s).

If you have users who want to be able to access the Oracle tables at
will, consider creating an Oracle view that does not have the "bad"
columns and have them link to that instead.

I find it works best to have a Oracle user with grant select (and
possibly other grant privileges depending on the tables/views included)
that users who want to do ODBC stuff to access.

The other bit of advice is to not bother using linked tables. Depending
on the number and nature of Jet joins performed, I've found, in my
Oracle app at least, that with 5 or more tables in an Access Jet query,
you run the danger of the results dropping data for whole columns. Use
pass through queries instead. I use DAO to create various PTQ for list
and combo box data sources, Access form recordsources and so on. In the
latter, it's great because you can apply filters to the long data type
if you have it in your Oracle table.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto
Nov 13 '05 #2
Joe
Thanks Tim,

I have actually tried what you say, but the problem IS with the primary key
field or unique index (not exactly sure which is most accurate to use in
this case). As I said, I have a colleague who is able to link the tables
without any probs, and I try EXACTLY the same thing on my comp but it
doesn't work :(.

I know that linked tables aren't the best and that I can use pass through
queries. However, pass through queries are not updateable ... so I would
have to built views at Oracle and link them anyway (a layer of indirection I
would prefer not to have to go through).

I did a bit more playing around and find that if I build an Access query
based on the culprit table, regardless of which fields I select, I still
experience the same problem. However, if I add a "distinct" keyword into
the query, problem goes away. i.e. SELECT DISTINCT CODE, DESCR FROM ANZSIC.

Mind you, I know that adding "distinct" results in a sort and possible
slowness and would much prefer not to have to use it. Also, a query/view
built using the "distinct" keyword is not updateable, so it doesn't help me
anyway.

I'm still a little stumped

Thanks
Joe

"Tim Marshall" <TI****@antarctic.flowerpots> wrote in message
news:cp**********@coranto.ucs.mun.ca...
Joe wrote:
I am using Access 2003 and are linking to an Oracle 9i ODBC datasource
(using Oracle ODBC drivers). After linking the tables in Access, I
inspect the data contained in the linked tables. For tables that involve
a number field as the primary key, the data is returned successfully.


IS this the issue? I have experienced exactly this situation when an
Oracle data type will not translate across the ODBC/Jet interface. In my
case it's been largely when an App I administer has Oracle date fields
with just time and no date in them.

What I've done and counseled other users of the maintenance app I
administer to do is to create the query "gradually". This means bringing
the linked tables into the query grid, linking them and bring down ONE
field at a time. Run the query. If you get data then go back to design
and bring down ONE more field. Repeat until you get the extremely
irritating #Deleted result and you'll know the culprit. Construct queries
omitting the incompatible field(s).

If you have users who want to be able to access the Oracle tables at will,
consider creating an Oracle view that does not have the "bad" columns and
have them link to that instead.

I find it works best to have a Oracle user with grant select (and possibly
other grant privileges depending on the tables/views included) that users
who want to do ODBC stuff to access.

The other bit of advice is to not bother using linked tables. Depending
on the number and nature of Jet joins performed, I've found, in my Oracle
app at least, that with 5 or more tables in an Access Jet query, you run
the danger of the results dropping data for whole columns. Use pass
through queries instead. I use DAO to create various PTQ for list and
combo box data sources, Access form recordsources and so on. In the
latter, it's great because you can apply filters to the long data type if
you have it in your Oracle table.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto

Nov 13 '05 #3
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

IDEA 1:

It may be possible that Access is not recognizing the primary key/unique
index on the Oracle table. In that case you can create PK/unique index
in access for the linked table - just be sure you are creating the
PK/index for the real PK/index on the Oracle table. E.g.: Oracle table
has ManagerID as the PK. In an Access query SQL view do this:

ALTER TABLE table_name ADD CONSTRAINT PK_table_name PRIMARY KEY
(ManagerID)

Run that, then check the design view of the linked Oracle table. There
should be a primary key icon on the ManagerID column.

You can do the same thing for a unique index:

CREATE UNIQUE INDEX idx_Index_name ON table_name (column_name)

See the Access Help articles on ALTER TABLE and CREATE INDEX for more
info.

IDEA 2:

In some linked SQL Server tables I had the same problem. Changed the
driver to most recent & problem went away. The Oracle driver may be out
of date. Get the most recent driver for the Oracle db version.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQbePAYechKqOuFEgEQJEtgCfeKMOOsaqzLvME5uVD5MyeN qJEdEAnjfI
tFGr5nBr5tg8P65pCI3br678
=/3ky
-----END PGP SIGNATURE-----
Joe wrote:
Thanks Tim,

I have actually tried what you say, but the problem IS with the primary key
field or unique index (not exactly sure which is most accurate to use in
this case). As I said, I have a colleague who is able to link the tables
without any probs, and I try EXACTLY the same thing on my comp but it
doesn't work :(.

I know that linked tables aren't the best and that I can use pass through
queries. However, pass through queries are not updateable ... so I would
have to built views at Oracle and link them anyway (a layer of indirection I
would prefer not to have to go through).

I did a bit more playing around and find that if I build an Access query
based on the culprit table, regardless of which fields I select, I still
experience the same problem. However, if I add a "distinct" keyword into
the query, problem goes away. i.e. SELECT DISTINCT CODE, DESCR FROM ANZSIC.

Mind you, I know that adding "distinct" results in a sort and possible
slowness and would much prefer not to have to use it. Also, a query/view
built using the "distinct" keyword is not updateable, so it doesn't help me
anyway.

I'm still a little stumped

Thanks
Joe

"Tim Marshall" <TI****@antarctic.flowerpots> wrote in message
news:cp**********@coranto.ucs.mun.ca...
Joe wrote:

I am using Access 2003 and are linking to an Oracle 9i ODBC datasource
(using Oracle ODBC drivers). After linking the tables in Access, I
inspect the data contained in the linked tables. For tables that involve
a number field as the primary key, the data is returned successfully.


IS this the issue? I have experienced exactly this situation when an
Oracle data type will not translate across the ODBC/Jet interface. In my
case it's been largely when an App I administer has Oracle date fields
with just time and no date in them.

What I've done and counseled other users of the maintenance app I
administer to do is to create the query "gradually". This means bringing
the linked tables into the query grid, linking them and bring down ONE
field at a time. Run the query. If you get data then go back to design
and bring down ONE more field. Repeat until you get the extremely
irritating #Deleted result and you'll know the culprit. Construct queries
omitting the incompatible field(s).

If you have users who want to be able to access the Oracle tables at will,
consider creating an Oracle view that does not have the "bad" columns and
have them link to that instead.

I find it works best to have a Oracle user with grant select (and possibly
other grant privileges depending on the tables/views included) that users
who want to do ODBC stuff to access.

The other bit of advice is to not bother using linked tables. Depending
on the number and nature of Jet joins performed, I've found, in my Oracle
app at least, that with 5 or more tables in an Access Jet query, you run
the danger of the results dropping data for whole columns. Use pass
through queries instead. I use DAO to create various PTQ for list and
combo box data sources, Access form recordsources and so on. In the
latter, it's great because you can apply filters to the long data type if
you have it in your Oracle table.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto


Nov 13 '05 #4
Joe
Thanks MGFoster,

I've checked that Access recognises the PK and it does in these cases ... so
knocks that on the head :(

I did more playing around and dropped any unique indexes and PKs on the
culprit tables in Oracle. I then relinked the table in Access. And ... it
works, I can see the data. Great, but this is not a solution, as we do need
PKs and unique indexes on our tables. So I reapplied the PK, and the
problem came back. I also tried just applying a unique index on the field
that should have been the PK (i.e. Code), without implementing the PK.
Problem also shows up in this case.

So, I am pretty sure that the unique index on a char or varchar2 field is
the thing causing all this. But still no real solution.

Any other suggestions?

Thanks
Joe
"MGFoster" <me@privacy.com> wrote in message
news:ia*****************@newsread3.news.pas.earthl ink.net...
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

IDEA 1:

It may be possible that Access is not recognizing the primary key/unique
index on the Oracle table. In that case you can create PK/unique index
in access for the linked table - just be sure you are creating the
PK/index for the real PK/index on the Oracle table. E.g.: Oracle table
has ManagerID as the PK. In an Access query SQL view do this:

ALTER TABLE table_name ADD CONSTRAINT PK_table_name PRIMARY KEY
(ManagerID)

Run that, then check the design view of the linked Oracle table. There
should be a primary key icon on the ManagerID column.

You can do the same thing for a unique index:

CREATE UNIQUE INDEX idx_Index_name ON table_name (column_name)

See the Access Help articles on ALTER TABLE and CREATE INDEX for more
info.

IDEA 2:

In some linked SQL Server tables I had the same problem. Changed the
driver to most recent & problem went away. The Oracle driver may be out
of date. Get the most recent driver for the Oracle db version.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQbePAYechKqOuFEgEQJEtgCfeKMOOsaqzLvME5uVD5MyeN qJEdEAnjfI
tFGr5nBr5tg8P65pCI3br678
=/3ky
-----END PGP SIGNATURE-----
Joe wrote:
Thanks Tim,

I have actually tried what you say, but the problem IS with the primary
key field or unique index (not exactly sure which is most accurate to use
in this case). As I said, I have a colleague who is able to link the
tables without any probs, and I try EXACTLY the same thing on my comp but
it doesn't work :(.

I know that linked tables aren't the best and that I can use pass through
queries. However, pass through queries are not updateable ... so I would
have to built views at Oracle and link them anyway (a layer of
indirection I would prefer not to have to go through).

I did a bit more playing around and find that if I build an Access query
based on the culprit table, regardless of which fields I select, I still
experience the same problem. However, if I add a "distinct" keyword into
the query, problem goes away. i.e. SELECT DISTINCT CODE, DESCR FROM
ANZSIC.

Mind you, I know that adding "distinct" results in a sort and possible
slowness and would much prefer not to have to use it. Also, a query/view
built using the "distinct" keyword is not updateable, so it doesn't help
me anyway.

I'm still a little stumped

Thanks
Joe

"Tim Marshall" <TI****@antarctic.flowerpots> wrote in message
news:cp**********@coranto.ucs.mun.ca...
Joe wrote:
I am using Access 2003 and are linking to an Oracle 9i ODBC datasource
(using Oracle ODBC drivers). After linking the tables in Access, I
inspect the data contained in the linked tables. For tables that
involve a number field as the primary key, the data is returned
successfully.

IS this the issue? I have experienced exactly this situation when an
Oracle data type will not translate across the ODBC/Jet interface. In my
case it's been largely when an App I administer has Oracle date fields
with just time and no date in them.

What I've done and counseled other users of the maintenance app I
administer to do is to create the query "gradually". This means bringing
the linked tables into the query grid, linking them and bring down ONE
field at a time. Run the query. If you get data then go back to design
and bring down ONE more field. Repeat until you get the extremely
irritating #Deleted result and you'll know the culprit. Construct queries
omitting the incompatible field(s).

If you have users who want to be able to access the Oracle tables at
will, consider creating an Oracle view that does not have the "bad"
columns and have them link to that instead.

I find it works best to have a Oracle user with grant select (and
possibly other grant privileges depending on the tables/views included)
that users who want to do ODBC stuff to access.

The other bit of advice is to not bother using linked tables. Depending
on the number and nature of Jet joins performed, I've found, in my Oracle
app at least, that with 5 or more tables in an Access Jet query, you run
the danger of the results dropping data for whole columns. Use pass
through queries instead. I use DAO to create various PTQ for list and
combo box data sources, Access form recordsources and so on. In the
latter, it's great because you can apply filters to the long data type if
you have it in your Oracle table.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto



Nov 13 '05 #5
Joe wrote:
Thanks MGFoster,

I've checked that Access recognises the PK and it does in these cases ... so
knocks that on the head :(

I did more playing around and dropped any unique indexes and PKs on the
culprit tables in Oracle. I then relinked the table in Access. And ... it
works, I can see the data. Great, but this is not a solution, as we do need
PKs and unique indexes on our tables. So I reapplied the PK, and the
problem came back. I also tried just applying a unique index on the field
that should have been the PK (i.e. Code), without implementing the PK.
Problem also shows up in this case.

So, I am pretty sure that the unique index on a char or varchar2 field is
the thing causing all this. But still no real solution.

Any other suggestions?


Just the drivers - see if they are same version on PC that works.
Otherwise, ya got me!

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
Nov 13 '05 #6
MGFoster wrote:
Just the drivers - see if they are same version on PC that works.
Otherwise, ya got me!


That's what I would suggest as well. Also are you use the MS Oracle
driver (I don't but I know of people who do with no problem) or the
Oracle driver?

We're using 8i and still have machines with 7.3.4 Oracle drivers. So
far, so good.

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto
Nov 13 '05 #7
Joe
Thanks all!

Well, I have tried going back to an earlier Oracle ODBC driver (9.0.1.2.0)
and the problem does seem to go away ... so I'm keeping my fingers crossed
that we don't have to use a newer version of the Oracle driver when we
deploy our Access application via a citrix environment in a few months time.

Thanks for all your suggestions. Glad to have this one nutted out.

Cheers
Joe

"Tim Marshall" <TI****@antarctic.flowerpots> wrote in message
news:cp**********@coranto.ucs.mun.ca...
MGFoster wrote:
Just the drivers - see if they are same version on PC that works.
Otherwise, ya got me!


That's what I would suggest as well. Also are you use the MS Oracle
driver (I don't but I know of people who do with no problem) or the Oracle
driver?

We're using 8i and still have machines with 7.3.4 Oracle drivers. So far,
so good.

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto

Nov 13 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Thomas Bartkus | last post by:
What can I do about my Access Linked ODBC tables showing the #Deleted error? I am using MySQL ODBC 3.51 Driver and Access 2000. I can create linked tables to the MySQL database running remotely...
6
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used...
11
by: DJJ | last post by:
I am using the MySQL ODBC 3.51 driver to link three relatively small MySQL tables to a Microsoft Access 2003 database. I am finding that the data from the MySQL tables takes a hell of a long time...
4
by: Lisa | last post by:
I upsized a database to SQL and accidentally deleted a table, how can I recreate that linked table?
0
by: Ellen Ricca | last post by:
I have an Access db with several ODBC linked ORACLE tables. These tables have multiple-field PK's. The tables work just fine in many diff types of queries including unmatched queries that are...
7
by: smd | last post by:
Hello and thanks for taking the time to read this. I've looked all over the web and newsgroups and can't find a solution to my problem. I've posted this question to the Access 2000 group as well -...
0
by: Cunfshon | last post by:
I wrote about this one a while ago, and got a few responces, but nothing resolved the issue. Figured I'd give everyone one more crack at it. I have an established MS Access database using linked...
1
by: RLN | last post by:
RE: Access 2003 using WinXP SP2 Problem: When I start up my app I double click either one of my two Oracle tables in the table list, it asks for an id and pass. I need them to be linked at...
3
by: Bret Kuhns | last post by:
I recently started a co-op/internship at a company and they are looking to migrate a large legacy supported application from OLEDB to SQL Server. I'm doing prelim work in experimenting with the...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.