Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > Oracle ASP
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Oracle ASP Using ASP with Oracle databases. For Oracle discussions not specific to ASP, please see the Oracle forum. For more ASP discussions, please see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle ASP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 15th, 2010, 07:44 PM
Registered User
Join Date: Nov 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default DataAdapter.Update Oracle Errors

Hi all,

I am having an issue with uploading a dataset to an oracle table. It appears to be associated with the date field that i am attempting to pass in. If i attempt to pass in with a valid formatted DateTime (mm/dd/yyyy) it send an oracle error "Not a Valid Month". If i update this to show as either MON or MONTH format and pass in that value, i receive oracle error "a non-numeric character was found where a numeric was expected".

Please help! I have pasted some of the code below:
ASP.NET code

Database dbOracle = new Database();
OracleCommand cmdOra = new OracleCommand(StoredProceduresNames.InsertData, dbOracle.OConnection);
cmdOra.CommandType = CommandType.StoredProcedure;
OracleDataAdapter da = new OracleDataAdapter();

//Add the sales date field
cmdOra.Parameters.Add(DetailParameters.SalesDate, OracleDbType.Date, 12, Column.SALES_MM_YY);

da.InsertCommand = cmdOra;
da.Update(dsDataSet, dtDataTable);
Oracle Sproc code



Last edited by tcraig04; November 15th, 2010 at 07:46 PM..
  #2 (permalink)  
Old November 16th, 2010, 03:17 PM
Registered User
Join Date: Nov 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

I was able to fix this issue by converting my DateTime to a dd MMM yyyy string format and passing that value in. Oracle can then convert this string into the correct DateTime in the database.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
update dataadapter karenai Visual Basic 2005 Basics 0 February 9th, 2008 10:46 PM
DataAdapter.Update puzzle wirerider ASP.NET 2.0 Basics 1 August 1st, 2006 06:57 PM
Datagrid.update() and DataAdapter.Update aarunlal ASP.NET 2.0 Professional 2 February 23rd, 2006 11:41 PM
DataAdapter.Update acts strangely oricalchis ADO.NET 0 September 21st, 2005 06:21 AM

All times are GMT -4. The time now is 05:18 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.