View Single Post
  #1 (permalink)  
Old November 15th, 2010, 06:44 PM
tcraig04 tcraig04 is offline
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

PROCEDURE INSERT_VALUES
(
v_SALES_DATE IN DATE
)
IS
BEGIN

INSERT INTO TABLE
(
SALE_DT
)
VALUES
(
v_SALES_DATE
);
END;

Last edited by tcraig04; November 15th, 2010 at 06:46 PM.
Reply With Quote