Home » RDBMS Server » Server Administration » ORA-01843: not a valid month in C++ embedded SQL
ORA-01843: not a valid month in C++ embedded SQL [message #374791] Mon, 02 July 2001 17:47
Sean
Messages: 22
Registered: July 2000
Junior Member
I received an ORACLE Error 01843 while running a C++ program with the following embedded SQL statement

try{
(*pconn).Sql("update BATCH_FD "
"set PBF_FB_CMPLT_DT = TO_DATE(:1, 'MM/DD/YYYY'), "
"PBF_FB_CMPLT_RCVD_TMSTMP = new_time((:2), 'CST', 'EST'), "
"PBF_FB_CMPLT_DT_SNT = TO_DATE(:3, 'MM/DD/YYYY HH24MISS'), "
"PBF_FB_CMPLT_SNT_TMSTMP = TO_DATE(:4, 'MM/DD/YYYY HH24MISS') "
"where PBF_LSP_PON = :5 "
"and PBF_VRSN = :6 "
"and PBF_FB_CMPLT_SNT_TMSTMP IS NULL "
"and PBF_FB_CMPLT_DT IS NULL");
(*pconn) << PBF.PBFFBCMPLTDT;
(*pconn) << RSPNS_RCVD_TMSTMP;
(*pconn) << PBF.PBFFBCMPLTDTSNT;
(*pconn) << PBF.PBFFBCMPLTSNTTMSTMP;
(*pconn) << LMS.LMS_LSP_PON;
(*pconn) << ERQ.ERQ_LSP_VRSN;
(*pconn).ExecuteSql();
}
catch(const dbio_cEx& E){
(*pconn).Rollback();
Fout << E.db() << endl;
Fout << "Error occured updating data for pon " << LMS.LMS_LSP_PON << endl;
mxs::Finalize();
exit(1);
}

The values for 5 and 6 are valid VARCHAR2 values which are pulled from DB tables
the values for 1, 2, 3, & 4 are all valid date/time strings parsed out from a DB LONG string which are then being passed out into the TO_DATE() to update a seperate table.

Help on what might be going wrong would be appreciated
Previous Topic: HELP!!
Next Topic: Re: Pass parameters to sqlplus
Goto Forum:
  


Current Time: Wed Jul 03 03:24:42 CDT 2024