Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Application Development » ERROR: 22P02: invalid input syntax for integer ( LINE 1: SELECT count(*) FROM idps WHERE uid='' ^ LOCATION: pg_atoi, numutils.c:52)
ERROR: 22P02: invalid input syntax for integer [message #4943] Thu, 27 August 2015 15:35 Go to previous message
rafs is currently offline  rafs
Messages: 69
Registered: May 2015
Member
My idps table:
CREATE TABLE idps (
    uid integer NOT NULL,
    idp_type character(3) NOT NULL,
    idp_id integer NOT NULL,
    idp_calc character varying(12) NOT NULL,
    idp_status integer DEFAULT 0 NOT NULL,
    created_date timestamp without time zone DEFAULT '2000-01-01 00:00:00'::timestamp without time zone NOT NULL,
    created_user character varying(16) DEFAULT 'SYSTEM'::character varying NOT NULL,
    revised_date timestamp without time zone,
    revised_user character varying(16)
);

CREATE SEQUENCE idps_uid_seq    START WITH 1    INCREMENT BY 1    NO MINVALUE    NO MAXVALUE    CACHE 1;
ALTER TABLE ONLY idps ALTER COLUMN uid SET DEFAULT nextval('idps_uid_seq'::regclass);
ALTER TABLE ONLY idps    ADD CONSTRAINT idps_pkey PRIMARY KEY (idp_type, idp_id);
ALTER TABLE ONLY idps    ADD CONSTRAINT idps_uid_key UNIQUE (uid);
ALTER TABLE ONLY idps ADD CONSTRAINT idps_idp_type_fkey FOREIGN KEY (idp_type) REFERENCES idp_types(idp_type);

The Error:
Fatal Error: PostgreSQL: ERROR: 22P02: invalid input syntax for integer: "" LINE 1: SELECT count(*) FROM idps WHERE uid='' ^ LOCATION: pg_atoi, numutils.c:52
SQL query: SELECT count(*) FROM idps WHERE uid=''
Error in line 578 of file 'C:\xampp\radicore\includes\dml.pgsql.class.inc'.

I tried: (1) removing the unique index from uid in the db, (2) removing "nextval('idps_uid_seq'::regclass)" as the default value in the RADICORE>>DB>>TABLE:idps>>COL:uid>>Default value field.
Neither worked.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to provide choices for two compound foreign keys in a form?
Next Topic: Running batch jobs
Goto Forum:
  


Current Time: Wed Apr 24 12:38:25 EDT 2024

Total time taken to generate the page: 0.01137 seconds