Postgresql locate
Posted: Fri 27 Dec 2013 15:22
Hi,
i have a problem with postgresql and unidac.
this is the script for create table:
CREATE TABLE mytableone
(
datetimes timestamp without time zone NOT NULL,
codemodule character varying(150) NOT NULL,
CONSTRAINT pk_date_module PRIMARY KEY (datetimes, codemodule)
)
WITH (
OIDS=FALSE
);
ALTER TABLE mytableone
OWNER TO postgres;
insert into mytableone values('06/15/2011 02:28:47 AM','GC_Injector_HP_5890_3240G19047-B');
insert into mytableone values('06/27/2011 01:51:33 PM','GC_Injector_HP_5890_3240G19047-B');
and i try to execute this code:
uniquery1.close;
uniquery1.IndexFieldNames:='datetimes,codemodule';
uniquery1.Open;
if not uniquery1.Locateex('datetimes;codemodule', VarArrayOf([('06/15/2011 02:28:47 AM'), 'GC_Injector_HP_5890_3240G19047-B']), [])
then showmessage('first one not found');
if not uniquery1.Locateex('datetimes;codemodule', VarArrayOf([('06/27/2011 01:51:33 PM'), 'GC_Injector_HP_5890_3240G19047-B']), []) then showmessage('second one not found');
i have a message 'first one not found';
if uniquery1.IndexFieldNames:=''
no problem
my regional options for dates is : MM/dd/yyyy
and for time: hh:mm:ss
i try with unidac 5.1 and 5.2 and delphi 2007
i try with locate and locateex.
i try with interbase no problem.
regards,
sorry for my english...
Lao
i have a problem with postgresql and unidac.
this is the script for create table:
CREATE TABLE mytableone
(
datetimes timestamp without time zone NOT NULL,
codemodule character varying(150) NOT NULL,
CONSTRAINT pk_date_module PRIMARY KEY (datetimes, codemodule)
)
WITH (
OIDS=FALSE
);
ALTER TABLE mytableone
OWNER TO postgres;
insert into mytableone values('06/15/2011 02:28:47 AM','GC_Injector_HP_5890_3240G19047-B');
insert into mytableone values('06/27/2011 01:51:33 PM','GC_Injector_HP_5890_3240G19047-B');
and i try to execute this code:
uniquery1.close;
uniquery1.IndexFieldNames:='datetimes,codemodule';
uniquery1.Open;
if not uniquery1.Locateex('datetimes;codemodule', VarArrayOf([('06/15/2011 02:28:47 AM'), 'GC_Injector_HP_5890_3240G19047-B']), [])
then showmessage('first one not found');
if not uniquery1.Locateex('datetimes;codemodule', VarArrayOf([('06/27/2011 01:51:33 PM'), 'GC_Injector_HP_5890_3240G19047-B']), []) then showmessage('second one not found');
i have a message 'first one not found';
if uniquery1.IndexFieldNames:=''
no problem
my regional options for dates is : MM/dd/yyyy
and for time: hh:mm:ss
i try with unidac 5.1 and 5.2 and delphi 2007
i try with locate and locateex.
i try with interbase no problem.
regards,
sorry for my english...
Lao