We had some experiences with Zeoslib 5.x and Oracle8i. It seems to
be stable and very effizient. So we tried to port some applications from
ACCESS to Oracle8i with Zeoslib6X and the problems began. The
ADO Version had problems with GUID fields the Oracle9i connection
refuses date fields. The 6.6 version is very attractive if somebody
has a patch for the damned date fields. We tracked the problem down
to the following lines
procedure TZOracleResultSet.Open;
....
Status := FPlainDriver.DefineByPos(FStmtHandle, CurrentVar.Define,
FErrorHandle, I, CurrentVar.Data, CurrentVar.Length, CurrentVar.TypeCode,
@CurrentVar.Indicator, nil, nil, OCI_DEFAULT);
CheckOracleError(FPlainDriver, FErrorHandle, Status, lcExecute, FSQL);
---> error when CurrentVar.ColType := stDate;
This behaviour is strang for
we have only the oci.dll from oracle8i in use.
We acces data in a oracle8i server
we verified that every procedure used in zeoslib form oci is loaded
corrrectly besides these 3 procedures:
TOCIDateTimeConstruct
TOCIDateTimeGetTimeZoneOffset
TOCIDateTimeGetTimeZoneName
None of these routines had been called before the error.
The Tdatetime... routines and TOCILob...Temporary routines
omitted in zplainoracle.pas from 6.1.5 load without error
Hope somebody has a workaround or a patch for this.
Migrating to Oracle>8i is not a option (customers).
Sincerely
Karl Scheurer
Oracle8i
Moderators: gto, cipto_kh, EgonHugeist
In the meantime we solved the datefield problem.
If somebody want to use Zeoslib 6.x with Oracle8 the
following changes are required:
in ZDbcOracleUtils procedure InitializeOracleVar
look for
....
stDate, stTime, stTimestamp:
begin
Variable.TypeCode := SQLT_TIMESTAMP;
Length := SizeOf(POCIDateTime);
end;
...
change to
stDate:
begin
Variable.TypeCode := SQLT_DAT;
Length := 7;
end;
stTime, stTimestamp:
begin
Variable.TypeCode := SQLT_TIMESTAMP;
Length := SizeOf(POCIDateTime);
end;
that's all to make Oracle8i accept Zeoslib
If somebody want to use Zeoslib 6.x with Oracle8 the
following changes are required:
in ZDbcOracleUtils procedure InitializeOracleVar
look for
....
stDate, stTime, stTimestamp:
begin
Variable.TypeCode := SQLT_TIMESTAMP;
Length := SizeOf(POCIDateTime);
end;
...
change to
stDate:
begin
Variable.TypeCode := SQLT_DAT;
Length := 7;
end;
stTime, stTimestamp:
begin
Variable.TypeCode := SQLT_TIMESTAMP;
Length := SizeOf(POCIDateTime);
end;
that's all to make Oracle8i accept Zeoslib
Hello, how are you?
I'm new in the forum, excused me for my english....
I live in Salto, (Uruguay, South America) and I am having a problem with Oracle 8 and Zeos, in Date datatypes, so I read something written
by you, where you publish a solution for this kind of problem.
My problem is ZQuery or ZTable on table with date type fields, I
use Oracle 8.05(in a server with Win NT), and in my pc I use
Lazarus 0.9.22 , Zeos 6.6.1 beta, and Win98.
With table within date type I don't have any problem, this is OK.
What you publish was:
=============================================
in ZDbcOracleUtils procedure InitializeOracleVar
look for
....
stDate, stTime, stTimestamp:
begin
Variable.TypeCode := SQLT_TIMESTAMP;
Length := SizeOf(POCIDateTime);
end;
...
change to
stDate:
begin
Variable.TypeCode := SQLT_DAT;
Length := 7;
end;
stTime, stTimestamp:
begin
Variable.TypeCode := SQLT_TIMESTAMP;
Length := SizeOf(POCIDateTime);
end;
=============================================
I made this change, but when I tried to reconstruct Lazarus, I had a
message telling me that there was some kind of compilation problem
(":zdbc6.5.1 failed to compile"). I suppoussed that I had to compile the
package with another tool, so I tried with FreePascal, but it don't see other units, and i get different (lots of) errors.
I want to know what should I do to fix it (compile) and Lazarus keep
working.
I really thank you because It's very difficult to find help in this place
(very few people use these tools)
THANK YOU ,
María Noel.
I'm new in the forum, excused me for my english....
I live in Salto, (Uruguay, South America) and I am having a problem with Oracle 8 and Zeos, in Date datatypes, so I read something written
by you, where you publish a solution for this kind of problem.
My problem is ZQuery or ZTable on table with date type fields, I
use Oracle 8.05(in a server with Win NT), and in my pc I use
Lazarus 0.9.22 , Zeos 6.6.1 beta, and Win98.
With table within date type I don't have any problem, this is OK.
What you publish was:
=============================================
in ZDbcOracleUtils procedure InitializeOracleVar
look for
....
stDate, stTime, stTimestamp:
begin
Variable.TypeCode := SQLT_TIMESTAMP;
Length := SizeOf(POCIDateTime);
end;
...
change to
stDate:
begin
Variable.TypeCode := SQLT_DAT;
Length := 7;
end;
stTime, stTimestamp:
begin
Variable.TypeCode := SQLT_TIMESTAMP;
Length := SizeOf(POCIDateTime);
end;
=============================================
I made this change, but when I tried to reconstruct Lazarus, I had a
message telling me that there was some kind of compilation problem
(":zdbc6.5.1 failed to compile"). I suppoussed that I had to compile the
package with another tool, so I tried with FreePascal, but it don't see other units, and i get different (lots of) errors.
I want to know what should I do to fix it (compile) and Lazarus keep
working.
I really thank you because It's very difficult to find help in this place
(very few people use these tools)
THANK YOU ,
María Noel.
I can reconstruct Lazarus with my changes now, however I have the problem with table with date type fields.
the error is: ORA- 00932 Inconsistent datatype.
The error is with Ztable or Zquery.
I now that Oracle 8.0.5 is old but in the company that I work use it.
Thank you for your interesting but I have the same problem still yet.
Maria Noel
the error is: ORA- 00932 Inconsistent datatype.
The error is with Ztable or Zquery.
I now that Oracle 8.0.5 is old but in the company that I work use it.
Thank you for your interesting but I have the same problem still yet.
Maria Noel
Hi Maria,
Is this still with date/time variables? Inserting/updating or also selecting?
Strange enough, the explanation of ORA-00932 sounds quite different:
"An attempt was made to perform an operation on incompatible datatypes. For example, adding a character field to a date field (dates may only be added to numeric fields) or concatenating a character field with a long field. "
Does your query work with sqlplus?
Some suggestions: Use ZSQLmonitor to find out what is going to the database, or turn tracing on in sqlnet.ora.
Regards,
Rüdiger
Is this still with date/time variables? Inserting/updating or also selecting?
Strange enough, the explanation of ORA-00932 sounds quite different:
"An attempt was made to perform an operation on incompatible datatypes. For example, adding a character field to a date field (dates may only be added to numeric fields) or concatenating a character field with a long field. "
Does your query work with sqlplus?
Some suggestions: Use ZSQLmonitor to find out what is going to the database, or turn tracing on in sqlnet.ora.
Regards,
Rüdiger
RÜDIGER, thank you.
the problem is in the select *, I think so.
example:
select *
from resguardo
and the table resguardo is:
ID_DOCUMENTO NUMBER(5),
FECHA_DOCUMENTO DATE,
NRO_COMPROBANTE NUMBER(5)
....
....
In the table moneda with
NRO_MONEDA NUMBER(5),
MONEDA VARCHAR2(15)
I don´t have any problem with select * from moneda.
In Ztable with TableName Resguardo, when I set active = True I've the problem.
Maria Noel
the problem is in the select *, I think so.
example:
select *
from resguardo
and the table resguardo is:
ID_DOCUMENTO NUMBER(5),
FECHA_DOCUMENTO DATE,
NRO_COMPROBANTE NUMBER(5)
....
....
In the table moneda with
NRO_MONEDA NUMBER(5),
MONEDA VARCHAR2(15)
I don´t have any problem with select * from moneda.
In Ztable with TableName Resguardo, when I set active = True I've the problem.
Maria Noel
Hi Maria,
Do you have persistent fields for table resguardo? That means, have you doubleclicked the component and choosen "add all fields"? Then ZTable1FECHA_DOCUMENTO should be a TDateField. What happens when you are trying it without persistent fields (just deleting them in the field editor)?
Regards,
Rüdiger
Do you have persistent fields for table resguardo? That means, have you doubleclicked the component and choosen "add all fields"? Then ZTable1FECHA_DOCUMENTO should be a TDateField. What happens when you are trying it without persistent fields (just deleting them in the field editor)?
Regards,
Rüdiger