Page 14 of 44

Posted: 26.06.2012, 14:40
by EgonHugeist
miab3,

Ok, Michal i do understand... That means that this property isn't set or overriden on the dbc connections. I check this this evening. If you assign the string fields to the dataset components then they are from type ftString/ftMemo instead of ftWideString/ftWideMemo i think. Can you confirm this?

Michael

Btw. Don't you habe an equal behavior for the other PlainDrivers? I think so.

Posted: 26.06.2012, 16:27
by miab3
@EgonHugeist

For table HR.JOBS:

FColumnNames ('JOB_ID', 'JOB_TITLE', 'MIN_SALARY', 'MAX_SALARY')
FColumnTypes (stString, stString, stInteger, stInteger) - D2006
FColumnTypes (stString, stUnicodeString, stInteger, stInteger) - DXE2/32

D2006:

object ZTable1: TZTable
Connection = ZConnection1
Active = True
TableName = 'HR.JOBS'
Left = 40
Top = 300
object ZTable1JOB_ID: TStringField
FieldName = 'JOB_ID'
Required = True
Size = 10
end
object ZTable1JOB_TITLE: TStringField
FieldName = 'JOB_TITLE'
Required = True
Size = 35
end
object ZTable1MIN_SALARY: TIntegerField
FieldName = 'MIN_SALARY'
end
object ZTable1MAX_SALARY: TIntegerField
FieldName = 'MAX_SALARY'
end
end

DXE2/32:

object ZTable1: TZTable
Connection = ZConnection1
TableName = 'HR.JOBS'
Left = 36
Top = 288
object ZTable1JOB_ID: TStringField
FieldName = 'JOB_ID'
Required = True
Size = 10
end
object ZTable1JOB_TITLE: TWideStringField
FieldName = 'JOB_TITLE'
Required = True
Size = 35
end
object ZTable1MIN_SALARY: TIntegerField
FieldName = 'MIN_SALARY'
end
object ZTable1MAX_SALARY: TIntegerField
FieldName = 'MAX_SALARY'
end
end

CREATE TABLE HR.JOBS
(
JOB_ID VARCHAR2(10),
JOB_TITLE VARCHAR2(35) NOT NULL,
MIN_SALARY NUMBER(6,0),
MAX_SALARY NUMBER(6,0),
CONSTRAINT JOB_ID_PK
PRIMARY KEY(
JOB_ID)

What's interesting on the first try the "Add all fields" in DXE2 I got:

Michal

Posted: 26.06.2012, 23:33
by EgonHugeist
miab3,

you're right! I have got the same trouble. I've debugged me down. On reading the Metainformations i do set the right field-types. Which means that UTF8AsWideString property is valid. But somewhere on the way up to the RODataSet where these informations lost. Now i'm wondering why but it's to late today. We had not very much oracle users. So i think here is a little bit more work to do. Also i did run into an new issue with oracle. I'm not able to update a row of table people(zeoslib). Hmpf not realy nice... :cry:

I'll inform you if thes issues are gone.

Michael

Posted: 27.06.2012, 16:00
by EgonHugeist
miab3,

the oracle Field-Type isue should be gone. Patch done Rev.1415
Also i did fix the last encoding issues i've seen on my unicode/ansi behavior tests for oracle, sqlite(no ansi available), postgresql, mysql.

[s]What i haven't solved actually is my '0 Records updated. Only one record should have been updated!' issue on oracle. It seems there is something wrong with NULL values and the BestRowIdentifier seem's not to be working corectly...[/s] Rev. 1417

Michael

Posted: 27.06.2012, 17:33
by miab3
@EgonHugeist

Zeos7eh1415 compiles and runs in my environment.
Rev. 1417 too :lol:
Now, D2006 and DXE2 properly and similarly works with Oracle.

Michal

Posted: 27.06.2012, 20:31
by EgonHugeist
miab3,

Did again several upgrades Just look here: http://zeos.firmos.at/viewtopic.php?p=15398#15398.

Thank you for your confirmation. :D

Michael

Posted: 27.06.2012, 22:38
by miab3
@EgonHugeist

Zeos7eh1421 compiles and runs in my environment.

Have you tried Firebird 3 with Zeos7eh?

Would be handy connect to DB2 Express-C (10.1). The free version allows you to 4GB RAM, 2 cores, unlimited database size.

Michal

Posted: 28.06.2012, 07:29
by EgonHugeist
miab3,

No i didn't tryed FB3. Is this engine offical releases now? I did only kknow about theire plans..

Accordind the IBM DB2 engine: I already did download that free server months ago. But i had no time to start playing with that server. Bugfixing before feature requests, Michal. Writing the missing DBC classes is less a problem for me than having knowlegde about the SQL behavior and meta-informations. So i'm actually not willing to implement new supports for new server protocols. If i see the first Stable state of Z7 then i or others can do this..

Michael

Posted: 28.06.2012, 22:37
by miab3
@EgonHugeist

Michael,
Why in Firebird 2.5 when I try to open the "RDB$PROCEDURES" I get:

Similarly, for:
"RDB$RELATIONS"
"RDB$TRIGGERS"

This is probably the type BLOB SUB_TYPE 8 SEGMENT SIZE 80
and BLOB SUB_TYPE 9 SEGMENT SIZE 80.

Michal

Posted: 28.06.2012, 22:41
by EgonHugeist
@miab3,

[s]a good question. Wonering about this. I already implemented the Trigger meta information for FireBird last year.. I'll check this, Michal.[/s]

Subtype 7 and 8 (external file desciption) where missed on the ZDbcInterbaseUtils.pas i've fixed this. Can you check if that issue is gone?
Rev. 1428

Michael

Posted: 29.06.2012, 00:20
by miab3
@EgonHugeist

"RDB$RELATIONS" work

"RDB$PROCEDURES" and "RDB$TRIGGERS" not
RDB$DEBUG_INFO BLOB SUB_TYPE 9 SEGMENT SIZE 80

Michal

Posted: 29.06.2012, 07:49
by EgonHugeist
@miab3,

Ohh you already wrote it and i was to blind to see it! :lol: Now it's a good questin what subtype 9 is, either text or binary. Did implement the types from the documentations, yesterday..

[s]I'll check this today.[/s] Can't find this type on the documentations. I'm afraid! So help me here. I'm not on my computer until afternoon today. If you execute 'select * from RDB$TYPES' you'll get a list of the firebird types. Scroll until you find 'TEXT' or 'ACL' in the RDB$FIELDTYPES column. Now you must find that type with ID 9. Which typename does the ID 9 has?

Btw you can ask TZConnection.DbcConnection.GetMetaData.GetTriggers() for the Triggern informations. That was one of my first patches last year and available only for firebird, Michal.

Michael

Posted: 29.06.2012, 10:15
by miab3
@EgonHugeist

There is no column "RDB$FIELDTYPES" in table "RDB$TYPES"

About RDB$DEBUG_INFO

RDB$FIELDS
(RDB$FIELD_NAME, RDB$QUERY_NAME, RDB$VALIDATION_BLR, RDB$VALIDATION_SOURCE, RDB$COMPUTED_BLR, RDB$COMPUTED_SOURCE, RDB$DEFAULT_VALUE, RDB$DEFAULT_SOURCE, RDB$FIELD_LENGTH, RDB$FIELD_SCALE, RDB$FIELD_TYPE, RDB$FIELD_SUB_TYPE, RDB$MISSING_VALUE, RDB$MISSING_SOURCE, RDB$DESCRIPTION, RDB$SYSTEM_FLAG, RDB$QUERY_HEADER, RDB$SEGMENT_LENGTH, RDB$EDIT_STRING, RDB$EXTERNAL_LENGTH, RDB$EXTERNAL_SCALE, RDB$EXTERNAL_TYPE, RDB$DIMENSIONS, RDB$NULL_FLAG, RDB$CHARACTER_LENGTH, RDB$COLLATION_ID, RDB$CHARACTER_SET_ID, RDB$FIELD_PRECISION)
VALUES
('RDB$DEBUG_INFO', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 8, 0, 261, 9, NULL, NULL, NULL, 1, NULL, 80, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);

From ibase.h

/* types less than zero are reserved for customer use */

#define isc_blob_untyped 0

/* internal subtypes */

#define isc_blob_text 1
#define isc_blob_blr 2
#define isc_blob_acl 3
#define isc_blob_ranges 4
#define isc_blob_summary 5
#define isc_blob_format 6
#define isc_blob_tra 7
#define isc_blob_extfile 8
#define isc_blob_debug_info 9
#define isc_blob_max_predefined_subtype 10

Michal

Posted: 29.06.2012, 15:14
by EgonHugeist
miab3,

that's a great help! Did declare that type as Binary-Lob. And nowhere was a description for that type to find..

I've testet the select with RDB$TRIGGERS and it work now.

Patch done. Rev 1431

Michael

Posted: 29.06.2012, 16:27
by miab3
@EgonHugeist

Thanks Michael,
Zeos7eh1430 compiles and runs D2006, DXE2 32/64, LazarusWin1.1.0/fpc 2.7.1 32/64.

I was able to open all Firiebird 2.5 tables I have found .

Michal