> PS> is it possible to specify user and pass without storing it in system
> vars - which is not secure?
>

>>You could build DPB as before. This is a piece that works as before, and
>>as I said, these files I'm distributing does not have the old constants
>>declared.


>>Adriano

Will be good to see sample in Pascal how to populate DPB to specify user and 
pass

----

I test api- but this is problematic for string
e.g. create database as UTF8 and then
CREATE TABLE PLEMIONA_GRACZ
(
  ID bigint NOT NULL,
  ID_SWIAT integer NOT NULL,
  ID_DT bigint NOT NULL,
  NAZWA varchar(64),
  ID_PLEMIE bigint,
  WIOSEK integer,
  PUNKTOW bigint,
  RANKING integer
);

INSERT INTO PLEMIONA_GRACZ (ID, ID_SWIAT, ID_DT, NAZWA, ID_PLEMIE, WIOSEK, 
PUNKTOW, RANKING) VALUES ('1309465', '1', '37', 'atadek', '6322', '1', 
'2522', '7453');
INSERT INTO PLEMIONA_GRACZ (ID, ID_SWIAT, ID_DT, NAZWA, ID_PLEMIE, WIOSEK, 
PUNKTOW, RANKING) VALUES ('1312097', '1', '37', 'Damian2206', '5184', '2', 
'8941', '3682');
INSERT INTO PLEMIONA_GRACZ (ID, ID_SWIAT, ID_DT, NAZWA, ID_PLEMIE, WIOSEK, 
PUNKTOW, RANKING) VALUES ('1312479', '1', '37', 'wojtek551', '0', '0', '0', 
'23327');
INSERT INTO PLEMIONA_GRACZ (ID, ID_SWIAT, ID_DT, NAZWA, ID_PLEMIE, WIOSEK, 
PUNKTOW, RANKING) VALUES ('1313970', '1', '37', 'Faust I', '8520', '1', 
'980', '11101');
INSERT INTO PLEMIONA_GRACZ (ID, ID_SWIAT, ID_DT, NAZWA, ID_PLEMIE, WIOSEK, 
PUNKTOW, RANKING) VALUES ('1316439', '1', '37', 'bob1992', '0', '1', '788', 
'11827');
INSERT INTO PLEMIONA_GRACZ (ID, ID_SWIAT, ID_DT, NAZWA, ID_PLEMIE, WIOSEK, 
PUNKTOW, RANKING) VALUES ('1318372', '1', '37', 'adam9112', '9037', '1', 
'665', '12393');
INSERT INTO PLEMIONA_GRACZ (ID, ID_SWIAT, ID_DT, NAZWA, ID_PLEMIE, WIOSEK, 
PUNKTOW, RANKING) VALUES ('1320748', '1', '37', 'Wojownik55', '8052', '1', 
'441', '13740');
INSERT INTO PLEMIONA_GRACZ (ID, ID_SWIAT, ID_DT, NAZWA, ID_PLEMIE, WIOSEK, 
PUNKTOW, RANKING) VALUES ('1321683', '1', '37', 'henio166', '7951', '1', 
'1128', '10583');
INSERT INTO PLEMIONA_GRACZ (ID, ID_SWIAT, ID_DT, NAZWA, ID_PLEMIE, WIOSEK, 
PUNKTOW, RANKING) VALUES ('1323152', '1', '37', 'artursiemianowic', '4468', 
'3', '14178', '2764');
INSERT INTO PLEMIONA_GRACZ (ID, ID_SWIAT, ID_DT, NAZWA, ID_PLEMIE, WIOSEK, 
PUNKTOW, RANKING) VALUES ('1326103', '1', '37', 'wdwdpp', '0', '1', '80', 
'18723');

and then

OutMessage = record
        ID: Int64;
        IDNull: SmallInt;
       ID_SWIAT: Integer;
        ID_SWIATNull: SmallInt;
    ID_DT: Int64;
        ID_DTNull: SmallInt;
    NAZWALen: SmallInt; <=== here must be 2 bytes length
    NAZWA: Array[0..64*4] of AnsiChar; <=== here we must multipy by 4
        NAZWANull: SmallInt;
    ID_PLEMIE: Int64;
        ID_PLEMIENull: SmallInt;
    WIOSEK: Integer;
        WIOSEKNull: SmallInt;
    PUNKTOW: Int64;
        PUNKTOWNull: SmallInt;
    RANKING: Integer;
        RANKINGNull: SmallInt;
    end;

    stmt := attachment.prepare(status, transaction, 0,
                'SELECT '
        + ' FIRST 10 r.ID, r.ID_SWIAT, r.ID_DT '
        + ', r.NAZWA '
        + ', r.ID_PLEMIE, r.WIOSEK, r.PUNKTOW, r.RANKING '
        + ' FROM PLEMIONA_GRACZ r '
                ,3, 0);

as you can see - for utf8 record must contain NAZWAlen and array size must 
be multipy by 4 (UTF8)

regards,
Karol Bieniaszewski




------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to