DIGIT-ARC read-only archive · snapshot: July 23, 2026

Problem while inserting into oracle, date values frm vb

4 posts · originally from https://geek.digit.in/community/threads/problem-while-inserting-into-oracle-date-values-frm-vb.38607/

N
nihilks Original post #1
Oct 14, 2006 at 9:52 AM
i use ADO in VB6 to connect to my Oracle database
i made a connection object 'con' and opened the database using it

when i executed the statement
con.Execute "insert into employee(no,join_date) values(424,'12-SEP-2004')"
i found that he new record was inserted into the database(i checked it using sql*plus) . But when retrieved through vb ,the date column showed NULL value

pls help
DukeNukem
Oct 14, 2006 at 10:40 AM
show me your code first
N
nihilks #3
Oct 14, 2006 at 2:38 PM
nihilks said:
i use ADO in VB6 to connect to my Oracle database
i made a connection object 'con' and opened the database using it

when i executed the statement
con.Execute "insert into employee(no,join_date) values(424,'12-SEP-2004')"
i found that he new record was inserted into the database(i checked it using sql*plus) . But when retrieved through vb ,the date column showed NULL value

pls help

Friends , I got my answer

format of insert statement should be :
con.Execute "insert into employee(no,join_date) values(424,'2004/9/12')"

ie date should be given as 'yyyy/mm/dd'


thanks DukeNukem for trying to help me
H
Oct 14, 2006 at 2:38 PM
well since the query seems to be right, first check if date is actually inseted in the table and error is only during retrival/display