Solved

about oracle database working with asp

Posted on 2002-06-03
6
478 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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
If-Then-Else ASP problem 6 78
Microsoft SQL ADO Conn Issue 6 64
Extracting nodes  using classical ASP 3 41
ASP sending two datas 2 30
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

738 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