Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking Oracle tables in Access 2000

Status
Not open for further replies.

Embo

MIS
Dec 12, 2001
4
GB
I have an Access 97 database that contains several linked Oracle tables.
These tables contain many number fields.
When you link the tables in Access 97, it brings them through as Double number fields.

I needed to convert the database to Access 2000 and it is linking the tables with Decimal numbers.

I am using code that references the data type and cannot find the VB code for decimal i.e. DB_DOUBLE is Double.

Is there any way I can force them to be linked as double fields again, or does anyone have a data type for decimal?

Thanks
 
This is an inherent problem with both the Microsoft and native Oracle ODBC drivers. The way I have dealt with it starting in Access 2.0 through '97 and into 2000 is by using lots of CDbl(MyOracleValue)'s often you will need to build local tables with converted values as an extra step. The good news is that the Oracle 9 native ODBC client sees decimals as decimals! It even allows joins between decimals and doubles, or decimals and long integers. It is also backward compatible to Oracle 8.16 / 8.15 and 7.34 databases BUT... you need to have all of your clients using the same Oracle 9 client. If you develop on a machine with an Oracle 9 client, and distribute it to Oracle 7/8 or Microsoft ODBC clients, any mismatched links will produce the 'Data type mismatch' error, or its brother the 'Object invalid or no longer set' error. You'll want to :
1) Install the Oracle 9 client.
2) Convert the '97 database to 2000
3) Use the linked table manager to refresh all the linked tables selecting the new Oracle 9 ODBC client. You may have to delete completely and reintroduce and least one linked table to save the link password.
4) Review and recompile all of your code to the newer DAO format.
 
Thanks for that.

Unfortunately, we are still using Oracle 7.34

However, I did manage to get around the problem this morning. The value of the data type seemed to be '20'.
I then added this value into my code so it read :

Case DB_INTEGER, DB_LONG, DB_CURRENCY, DB_SINGLE, _
DB_DOUBLE, DB_BYTE, 20

This seems to pick up the decimal value OK.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top