unknown column error / D7

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for Oracle in Delphi and C++Builder
Post Reply
Thomas.Schweikert
Posts: 30
Joined: Tue 27 Jun 2006 15:46

unknown column error / D7

Post by Thomas.Schweikert » Fri 29 Jul 2011 14:14

Hi,

with the new update v4.90 every TSQLDataSet produces
an "unknown column ...' error.

with persistent fields we got:
"different types for field 'ID'; expected: integer; found BCD"

with the last used version 4.70.XX and with the new versions
for FireBird/Interbase and MS-SQL everything works like before.

we read the connection parms from an ini file:
...
BlobSize=-1
DataBase=ORA8
ErrorResourceFile=
LocaleCode=0000
Password=****
Oracle TransIsolation=ReadCommited
RoleName=Normal
User_Name=USER
LongStrings=True
InternalName=
UseQuoteChar=False
UseUnicode=False
FetchAll=False
CharLength=0
Charset=WE8ISO8859P1
BCDPrecision=0
FloatPrecision=38
IntegerPrecision=10

Simple sample to reproduce
CREATE TABLE TEST
(
ID NUMBER(10,0),
ID_1 NUMBER(10,0) NOT NULL,
ID_2 NUMBER(10,0) NOT NULL,
FORM_NAME VARCHAR2(40),
CONSTRAINT TEST_PK
PRIMARY KEY (
ID
) ENABLE VALIDATE
)......

select * from TEST where ID_1 = :x and ID_2 = :y and FORM_NAME = :z

Thomas

-------------------------
Delphi 7 ENT
Oracle 8.1.7.X.X

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Wed 03 Aug 2011 08:36

Hello,

To solve this problem, try to set the EnableBCD property to false in the following way:

Code: Select all

procedure TForm1.SQLConnection1AfterConnect(Sender: TObject);
const
  coEnableBCD = TSQLConnectionOption(102); // boolean
begin
  SQLConnection1.SQLConnection.SetOption(coEnableBCD, Integer(False));
end;
or starting from Delphi 2007

Code: Select all

SQLConnection1.Params.Values['EnableBCD']:='false';

Thomas.Schweikert
Posts: 30
Joined: Tue 27 Jun 2006 15:46

Post by Thomas.Schweikert » Wed 10 Aug 2011 14:58

Same error

ORA-00904

with BCD off

SetOption(coEnableBCD, Integer(False));


Thomas

-------------------------
Delphi 7 ENT
Oracle 8.1.7.X.X

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Thu 11 Aug 2011 12:23

Hello,

I cannot reproduce the problem.
Please send a small application demonstrating the problem to alexp*devart*com

Thomas.Schweikert
Posts: 30
Joined: Tue 27 Jun 2006 15:46

Post by Thomas.Schweikert » Wed 21 Sep 2011 07:59

Hi,

with 5.01 the error has gone.
All of our tables have a field ID NUMBER(10,0)
Getting metadata for NUMBER data type is fixed

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Wed 21 Sep 2011 08:11

Hello,

Glad to see that the problem was solved. If you have any other questions, feel free to contact us.

mWallace
Posts: 1
Joined: Thu 29 Dec 2011 12:28

Post by mWallace » Wed 11 Jan 2012 14:56

Good to see the solution to this tough issue!

Post Reply