« first day (2440 days earlier)      last day (1878 days later) » 

6:52 AM
Hi all. I am observing data is not getting inserted into postgres table. Its schema is as follows:
DROP TABLE IF EXISTS customer CASCADE;

CREATE TABLE customer
(
   customerid    serial        NOT NULL,
   customername  varchar(25),
   age           integer,
   gender        varchar(1)
);

-- Column customerid is associated with sequence public.customer_customerid_seq

ALTER TABLE customer
   ADD CONSTRAINT customer_pkey
   PRIMARY KEY (customerid);

COMMIT;
The insert query is as follows:
Insert into public.Customer ("customername", "age", "gender") values
('Jack-Jack Par', 1, 'M'),
('Elastigirl', 26, 'F'),
('Violet Parr', 13, 'F'),
('Dash', 10, 'M'),
('Mr Incredible', 36, 'M'),
('Lucy Wilde', 33, 'F'),
('Agnes', 5, 'F'),
('Gru', 36, 'M'),
('Margo', 14, 'F'),
('Edith', 9, 'F');
It does say 10 rows affected, however, on select I don't see data...
 
 
3 hours later…
9:57 AM
ey guys
 
hey
 
hows going
 
10:13 AM
morning all
hey @ARr0w you about?
 
 
3 hours later…
12:56 PM
@deostroll i think you need to execute commit after insert...
 
1:13 PM
@WhatsThePoint occupied with alot of work
@WhatsThePoint you tell?
 
1:31 PM
same here
 
when Visual Studio gives you and error {"Nullable object must have a value."}
 
@Veljko89 dunno man
 
@Veljko89 when some variable is null.
that variable can be the instance of an object
for example.

chair (object)
leg1 (attribute)
leg2 (attribute)
leg3 (attribute)
leg4 (attribute)
in VS if you'd do this directly:

chair.leg1 = "something";

it will give you null error.
or chair.leg1 == "something" (comparing) -- will give you the null error.
because, object is null. To use/assign/compare it or its attributes you need to initialize the class(object).
and this is how you initialize the class in c#, java and any language that has concept of OOP
chair chair1 = new chair() <-- new chair (initializes the class by calling the class's Constructor)
ah!
 
hehe
yeah man i know that shit :D
 
well
good
now when you'll use

chair.leg1 = "something";
chair.leg1 == "something";

it won't throw exceptions.
since it is initialized.
same goes for the value based variables.
they must be initialized, declared and assigned

in order to be used or to be compared.
 
1:51 PM
 
2:23 PM
problem was casting of nullable => (bool)p.IsSmallReq .. but bool? IsSmallReq was null
so had error {"Nullable object must have a value."} .... which has some sense when you think about it :D
 
3:22 PM
Dude! c'mon!
(bool)p.IsSmallReq <- you were using it without assigning it or initializing it without a value since it was value type variable.
you took quiet much time :P
 
3:53 PM
i'm off
 
4:05 PM
@ARr0w cya
 

« first day (2440 days earlier)      last day (1878 days later) »