Home » Infrastructure » Windows » Problem in Inserting date values from VB to Oracle database
Problem in Inserting date values from VB to Oracle database [message #99880] Wed, 08 May 2002 21:16 Go to next message
Charanjit
Messages: 1
Registered: May 2002
Junior Member
Dear Friends,
If somebody can help me with the insert query I am executing in the VB6.

I want to insert values from Text boxes of VB to their corresponding fields. The query is written below. I am receiving error no 13. "Type Mismatch"

-----------------------------------------------
v_TxtDoj = cDate (TxtDoj)
v_TxtDoc = CDate (TxtDoc)

sqlquery = "Insert into empmaster(empid, ename, joindate, confirmdate) values (" + cint(TxtEmpid)+ ",'" + TxtEname + "'," + "To_Date ('" + v_txtdoj + "', 'dd/mm/yyyy')," + "To_Date ('" + v_txtdoc + "', 'dd/mm/yyyy')"
----------------------------------------------------
I am receiving error on this SqlQuery message. Please explain the correct syntax while inserting date values.

Charanjit
Re: Problem in Inserting date values from VB to Oracle database [message #99898 is a reply to message #99880] Sun, 12 May 2002 21:24 Go to previous messageGo to next message
Paul
Messages: 164
Registered: April 1999
Senior Member
oracle's default date format is dd-mmm-yy or dd-mmm-yyyy like 12-OCT-02. So before you pass the date from vb convert it to this format.
Re: Problem in Inserting date values from VB to Oracle database [message #100096 is a reply to message #99898] Thu, 18 July 2002 05:41 Go to previous message
!
Messages: 1
Registered: July 2002
Junior Member
strinl like that: ..., to_date( '22.12.1999', 'dd.mm.yyyy' ), ...
Previous Topic: Re: Oracle 8 Personal Installation on WIN 2000 failure
Next Topic: Re: solution for JREW error on Pentium 4 installations
Goto Forum:
  


Current Time: Fri Nov 22 18:36:00 CST 2024