Solved

about oracle database working with asp

Posted on 2002-06-03
6
481 Views
Last Modified: 2007-11-27
i have aproblem that i design an asp working with oracle database, and i use oo4o to connect the vbscript code to the database ,and i have atable that contain afield called (record_date),when i try to submit data into the table ,there is an error occured which said (oip 00005:variable not in avalid date format),although i have another page submitting the date field normally in the format(ex:1-may-2000)with out any problems,what can i do to solve this problem?.
thank you.
0
Comment
Question by:osmanshammat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 11

Expert Comment

by:mouatts
ID: 7051429
Could you post the offending code please.
0
 
LVL 20

Accepted Solution

by:
jitganguly earned 200 total points
ID: 7051434
Use IsDate function before you submit to the db.

If isDate(mydate) then
' submit code
end if

As always, code is better to suggest you something
0
 
LVL 2

Expert Comment

by:prokni
ID: 7051513
User to_date(date_var,'DD-MON-YYYY') to make sure you are sending a right format.
Use it in your sql str.Replace date with your date variable.
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
LVL 5

Expert Comment

by:kcm76
ID: 7054557
i agree with prokni

first test hardcoding the value.

date_var = '1-may-2000'

strQry = "insert into table1(date_of_joining) values (to_date('" & date_var & "','DD-MON-YYYY')"

Objcn.Execute strQry

**date_var is a string variable**

KCM
0
 
LVL 11

Expert Comment

by:mouatts
ID: 7055569
Actually safer to use a date format string of 'DD-MON-RRRR' which is y2k complient.
0
 
LVL 4

Expert Comment

by:Wakie
ID: 9142917
It appears this question has been abandoned.

I will leave a recommendation in the Cleanup topic area that this question will be:

- Question PAQ'd and points to jitganguly -

Please leave any comments here within the next seven days.

DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Wakie,
EE Cleanup Volunteer.
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question