Solved

about oracle database working with asp

Posted on 2002-06-03
6
460 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now