Problem while inserting into oracle, date values frm vb

Status
Not open for further replies.

nihilks

Right off the assembly line
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
 
OP
N

nihilks

Right off the assembly line
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
 

hitesh_hg

Journeyman
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
 
Status
Not open for further replies.
Top Bottom