Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 180193 - Last Review: May 17, 2007 - Revision: 2.5
FIX: DAO Oracle and the NUMBER Datatype
This article was previously published under Q180193
When using DAO/Jet to access an Oracle database, you get either blank rows
back in a grid or rows filled with #DEFINE (when using Access).
This behavior is caused by DAO having a problem determining the datatype
for Oracle columns defined as NUMBER.
This behavior is only exhibited when the Oracle columns have been defined
as NUMBER. If you define the columns as NUMBER(38,0), which is the
equivalent of just NUMBER, everything works as expected. When you use
DAO/Jet to access an Oracle database, you need to specify the size (total
digits) and precision for table columns of type NUMBER.
Microsoft has confirmed this to be a problem in the versions of Microsoft
FrontPage listed at the beginning of this article.
This bug was corrected in MDAC 2.1 Service Pack 2.
You can obtain the latest version of MDAC from the following Microsoft Web site:
This problem was identified using Visual Basic 5.0 Enterprise edition, MDAC
1.5 (see the REFERENCES section below), and Oracle 7.3. You may see
different behavior with different versions of these components. Following
is an example of what will work and what will fail when creating an Oracle
table that will be accessed by DAO/Jet.
This Oracle table definition will fail:
CREATE TABLE daotest (item_number NUMBER PRIMARY KEY,
depot_number NUMBER);
This Oracle table definition will work:
CREATE TABLE daotest (item_number NUMBER(38,0) PRIMARY KEY,
depot_number NUMBER(38,0));
If you are using Access, the first example will fill your grid with
#DELETE. If you are using Visual Basic/DAO, your grid will show the correct
number of rows but they won't contain any data. You can still insert
records but you never get the correct display.
ORACLE: The Complete Reference by George Koch and Kevin Loney
For additional information, please see the following article in the
Microsoft Knowledge Base:
175018Â
(http://kbalertz.com/Feedback.aspx?kbNumber=175018/EN-US/
)
: HOWTO: Acquire and Install the Microsoft Oracle ODBC Driver
(c) Microsoft Corporation 1998, All Rights Reserved. Contributions by Sam Carpenter, Microsoft Corporation.
APPLIES TO
- Microsoft Visual Basic 5.0 Enterprise Edition
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Open Database Connectivity 2.0
- Microsoft Data Access Components 2.1
| kbbug kbdriver kbfix kbmdac210sp2fix kbmdacnosweep kboracle KB180193 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate