Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old March 25th, 2004, 12:00 AM
chelleybaby chelleybaby is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 20 chelleybaby User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question date problem

Hi! i am using oracle sql and ASP to do my shopping cart.
Below is a snippet of my asp codes.

sqlString = "INSERT INTO orders ( " &_
"order_userID, " &_
"order_ccnumber, " &_
"order_entrydate " &_
") VALUES ( " &_
" '" & userID & "'," &_
" '" & ccnumber & "', " &_
" '" & NOW() & "' " &_
")"


If I use response.write, i will see

INSERT INTO orders ( order_userID, order_ccnumber, order_entrydate ) VALUES ( '41', '1111222233334444', '3/25/2004 1:57:10 PM' )

which is correct. But if i use Conn.Execute, it will prompt me an error that says invalid month. This is my table in oracle sqlplus. Pls tell me what's wrong and how to rectify it. Thanks

create table orders(
order_id INTEGER not null,
order_userID INTEGER not null,
order_entrydate date,
order_ccnumber INTEGER);

Reply With Quote
  #2  
Old March 25th, 2004, 01:52 AM
galith_haham galith_haham is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 64 galith_haham User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 25 m 17 sec
Reputation Power: 5
Hi,

Try running

INSERT INTO orders ( order_userID, order_ccnumber, order_entrydate ) VALUES ( '41', '1111222233334444', to_date('3/25/2004 1:57:10' ,'mm/dd/yyyy hh24:mi:ss') ;

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > date problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway