Solved

about oracle database working with asp

Posted on 2002-06-03
6
474 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
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need help editing script 3 84
Time Conversions...both ways 2 22
Cannot open file from ASP if user is "logged in" 13 32
Obtain data from database .mdb 4 30
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…
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/…
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

680 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