[Gambas-devel] makefile !!!

Daniel daniel at ...318...
Wed Oct 12 02:25:52 CEST 2005


PV wrote:

> Hi Daniel,
>
> On 10/10/2005 23:41, Daniel wrote:
>
>> ok, this is for the 1.9.20
>
>
> I've found a small problem in the firebird component regarding 
> retrieving field names in a table.
>
> If I tried
>
>   DIM c AS NEW Connection
>   DIM hTables AS Object
>   DIM hFields AS Object
>
>   WITH c
>     .Type = "firebird"
>     .Host = "localhost"
>     .Name = "/my/path/to/database.gdb"
>     .Login = "blabla"
>     .Password = "blabla"
>   END WITH
>
>   c.Open
>
>   FOR EACH hTables IN c.Tables
>     IF NOT (Left(hTables.Name, 4) = "RDB$") THEN
>       PRINT "Table: " & hTables.Name
>       FOR EACH hFields IN hTables.Fields
>         PRINT hFields.Name
>       NEXT
>     END IF
>   NEXT
>
> the program died unexpectedly raising the famous signal #6.
>
> After a little investigation, I found out that the problem was on line 
> 1690 of main.cpp
>
> In fact, the problem occurred with a field like this
> CREATE TABLE test (
> DATA date default 'now',
> ...
> );
>
> so I changed the query in line 1690 from "select *" to "select 
> rdb$field_name" and the problem disappeared.
>
> Since the actual data returned by the query doesn't seem to matter 
> (it's just the number of returned rows that counts and doing a "select 
> *" seems a bit overkill), changing the query this way shouldn't do any 
> harm.
>
> I haven't investigated too deep to see where the actual fault comes up 
> but I made a guess.
>
> From isql, doing a select like
>
> select * from rdb$relation_fields where rdb$relation_name='TEST';
>
> gives (on a date field without default value) a result like
>
> RDB$FIELD_NAME                  DATA
> RDB$RELATION_NAME               TEST
> RDB$FIELD_SOURCE                RDB$2
> RDB$QUERY_NAME                  <null>
> RDB$BASE_FIELD                  <null>
> RDB$EDIT_STRING                 <null>
> RDB$FIELD_POSITION              1
> RDB$QUERY_HEADER                <null>
> RDB$UPDATE_FLAG                 1
> RDB$FIELD_ID                    1
> RDB$VIEW_CONTEXT                <null>
> RDB$DESCRIPTION                 <null>
> RDB$DEFAULT_VALUE               <null>
> RDB$SYSTEM_FLAG                 0
> RDB$SECURITY_CLASS              <null>
> RDB$COMPLEX_NAME                <null>
> RDB$NULL_FLAG                   <null>
> RDB$DEFAULT_SOURCE              <null>
> RDB$COLLATION_ID                <null>
>
> and no crash whereas on a date field with default value I get
>
> RDB$FIELD_NAME                  DATA2
> RDB$RELATION_NAME               TEST
> RDB$FIELD_SOURCE                RDB$3
> RDB$QUERY_NAME                  <null>
> RDB$BASE_FIELD                  <null>
> RDB$EDIT_STRING                 <null>
> RDB$FIELD_POSITION              2
> RDB$QUERY_HEADER                <null>
> RDB$UPDATE_FLAG                 1
> RDB$FIELD_ID                    2
> RDB$VIEW_CONTEXT                <null>
> RDB$DESCRIPTION                 <null>
> RDB$DEFAULT_VALUE               5:5b2
> BLOB display set to subtype 1. This BLOB: subtype = 2
>
> RDB$SYSTEM_FLAG                 0
> RDB$SECURITY_CLASS              <null>
> RDB$COMPLEX_NAME                <null>
> RDB$NULL_FLAG                   <null>
> RDB$DEFAULT_SOURCE              5:5b3
> default 'now'
> RDB$COLLATION_ID                <null>
>
> and a crash.
>
> That BLOB line and the following empty one look suspicious to me and 
> that is most likely the cause of the crash.
>
> My guess seems to be confirmed by the fact that selecting only 
> RDB$FIELD_NAME eliminates any problems.
>
> I am using Firebird V1.5.1.4481, don't know if things have changed in 
> other versions.
>
>
> Ciao,
> Piero
>
>
>
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Gambas-devel mailing list
> Gambas-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-devel
>
>
Piero can you test this version

thank's daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gb.db.firebird-11.10.2005-1.9.20.tar.gz
Type: application/x-gzip
Size: 238505 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20051012/e2dc9064/attachment.bin>


More information about the Devel mailing list