Problem with Abstract Data Type

Problem with Abstract Data Type

Post by Michael Eva » Thu, 10 Apr 2003 06:01:46



I am investigating a problem that involves the use of abstract data
types specifically
the use of object_key which I have never come across before.

I have a table (table_a) that was created with a field cr_ingrs_key
defined as
object_key system maintained.

In an ABF program I have a field defined as tf.cr_ingrs_key defined as
char(16) NOT NULL.

The ABF program inserts the current value into the tf._cr_ingres_key
using the
statement

SELECT field_1 as :tf.field_1,
        field_2 as :tf.field_2,
        char(cr_ingrs_key) as :tf.cr_ingrs_key
FROM table_a

The program then performs some validation and on completion it attempts
to update
the status of the record  via the following statement

UPDATE  table_a
SET     err_field='OK'
WHERE cr_ingrs_key = object_key(:tf.cr_ingrs_key);

and the program fails with the following message
"E_AD5080 The conversion from the datatype specified (length 15 bytes)
to
     logical key type (ie. table_key or object_key with length 16 bytes)
     failed because the lengths of the two datatypes were not the same.
     (Tue Apr  8 12:57:01 2003)"

 From reading the manual values assigned to object_keys must be 16
character strings.
Based on what i have seen in the program the field is defined as
char(16) so I don't see
where the system is getting a field length of 15 from.  I also tried
changing the field
tf.cr_ingres_key from char(16) to c16 to see if this made a difference
- but got the same
error.

Does anyone have any ideas of what could be causing this problem.

(Ingres version 2.5)

--------------------------
Regards

Mike Evans

Vision Systems Software

Tel No#  431-0193
Fax No# 431-0192

 
 
 

Problem with Abstract Data Type

Post by Michael Eva » Thu, 10 Apr 2003 22:25:23



> I am investigating a problem that involves the use of abstract data
> types specifically
> the use of object_key which I have never come across before.

> I have a table (table_a) that was created with a field cr_ingrs_key
> defined as
> object_key system maintained.

Thanks Karl - got the problem solved.

--------------------------
Regards

Mike Evans

Vision Systems Software

Tel No#  431-0193
Fax No# 431-0192

 
 
 

1. Abstract Data Parameter Type?

Greetings,
I have created abstract data provider class (DataAccessor) which get
implemented by .net data provider-specific concrete classes (a SQL provider
class, a OLE DB class, etc).  This helps keep the user ignorant from how db
access gets implemented.  The user has access to these static concrete
classes through a class factory component called Data Manager. So for
example the user would call:

'This returns a reference to concrete class which factory resolves from the
connectionString
 Dim objDBAccess As DataAccessor =
DataManager.GetDBAccessor(connectionString)

My questions is how to best handle parameter manipulation.  I want to enable
the sending of parameters and parameter arrays through Execute methods, but
how to do that if they don't know what provider they are using (don't want
them to send SQLParameter or OLEDBParameter).  Currently the only
implementation I could think of was to added static Set and Gets.  This is
not very robust, however, and does not enable the passing of parameters in
Execute calls.

For example, I want them to be able to:

'where arrSomeArrayofParams is an array of IDataParam-compliant types
objDBAccess.ExecuteNonQuery(CommandType.StoredProcedure,
"getProductDetails", arrSomeArrayofParams)

They currently can only set param one at time, then execute:

ParameterType.dmPtInt, 1)
objDBAccess.ExecuteNonQuery(Nothing, CommandType.StoredProcedure,
"getProductDetails", Nothing)

Any help appreciated!
Thanks in advance
Dave

2. US-PA-ORACLE MANUFACTURING CONSULTANT

3. How to retrive abstract data type using jdbc with oracle8.04

4. Using sp_addlogin in a Sproc

5. User Customisable Schema and Oracle Abstract Data Types

6. 15062-OK-TULSA-System Design-ORACLE-UNIX-Communication Skills-Analyst

7. How to retrive abstract data type via jdbc?

8. US-GEORGIA-SENIOR HR CONSULTANT

9. SQL Loader and Abstract Data Types and Nested Tables

10. abstract data types

11. Abstract Data Types

12. abstract data types/objects

13. Data Type Problem accessing Btrieve (MBF) data type