4 Replies - 3288 Views - Last Post: 17 October 2006 - 01:10 AM Rate Topic: ***** 1 Votes

#1 nihilks   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 13-October 06

Problem whileinserting into oracle date values frm vb

Posted 13 October 2006 - 11:06 AM

i use ADO in VB6 to connect to my Oracle database
i made aconnection 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
Is This A Good Question/Topic? 0
  • +

Replies To: Problem whileinserting into oracle date values frm vb

#2 Amadeus   User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 250
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

Re: Problem whileinserting into oracle date values frm vb

Posted 13 October 2006 - 11:14 AM

How is the table set up? I notice to have space for three values in the field specification clause, but are supplying only two values.
Was This Post Helpful? 0
  • +
  • -

#3 nihilks   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 13-October 06

Re: Problem whileinserting into oracle date values frm vb

Posted 13 October 2006 - 07:09 PM

View PostAmadeus, on 13 Oct, 2006 - 11:14 AM, said:

How is the table set up? I notice to have space for three values in the field specification clause, but are supplying only two values.


the table has 2 fields
TABLE EMPLOYEE
FIELD DATATYPE
no number(6)
join_date date

(Sorry,the field specification clause in the post shows 2 commas,
but actually there is only one . That was a typing mistake)

This post has been edited by nihilks: 14 October 2006 - 01:51 AM

Was This Post Helpful? 0
  • +
  • -

#4 nihilks   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 13-October 06

Re: Problem whileinserting into oracle date values frm vb

Posted 14 October 2006 - 01:49 AM

View Postnihilks, on 13 Oct, 2006 - 11:06 AM, said:

i use ADO in VB6 to connect to my Oracle database
i made aconnection 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 Amadeus for trying to help me
Was This Post Helpful? 0
  • +
  • -

#5 suryajoe   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 17-October 06

Re: Problem whileinserting into oracle date values frm vb

Posted 17 October 2006 - 01:10 AM

View PostAmadeus, on 13 Oct, 2006 - 11:14 AM, said:

How is the table set up? I notice to have space for three values in the field specification clause, but are supplying only two values.


Can u please help me to learn VB and oracle connectivity.
how did u learn this. iam getting problem ie values are accepted in VB but not inserted in SQL plus. How to solve it?
Can u send a review of ur project. It's code and operation
please help. mail to [email protected]
thank u nikil
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1