Solved

about oracle database working with asp

Posted on 2002-06-03
6
472 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Query to get the soonest date out of a few records 2 51
XML Parsing Classic ASP 5 64
Error viewing ASP page 12 173
If-Then-Else ASP problem 6 67
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
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/…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

840 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