Problem while inserting into oracle, date values frm vb

Discussion in 'Software Q&A' started by nihilks, Oct 14, 2006.

Thread Status:
Not open for further replies.
  1. nihilks

    nihilks New Member

    Joined:
    Oct 12, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    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
     
  2. DukeNukem

    DukeNukem Come get Some

    Joined:
    Aug 28, 2005
    Messages:
    417
    Likes Received:
    2
    Trophy Points:
    0
    Location:
    Home Sweet Home
    show me your code first
     
  3. OP
    OP
    nihilks

    nihilks New Member

    Joined:
    Oct 12, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    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
     
  4. hitesh_hg

    hitesh_hg New Member

    Joined:
    Oct 28, 2003
    Messages:
    138
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    NCR
    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
     
Thread Status:
Not open for further replies.

Share This Page