ng-first
11-23-2007, 06:46 AM
Hi all :-),
I'm working with OSM 15.50A and oracle 10.
I'm trying to create masterdata via java, in this way:
DMMasterdata cMasterdata = (DMMasterdata)WMSession.getWMSession().newElement("MASTERDATA");
cMasterdata.setValue(pdm.DB_DEFAULT_NAME, codice);
cMasterdata.setValue("CREATE_DATE",row.getDataCreazione());
cMasterdata.setCreateDate(row.getDataCreazione());
Calendar cal = Calendar.getInstance();
cal.setTime(row.getDataAggiornamento());
cMasterdata.setValue("LAST_UPDATE_DATE",cal.getTimeInMillis());
but, this peice of code produces several errors .... :-( !!
1 - I have an exception that told me that I can't update CREATE_DATE attribute ... ;
2 - even if I use the method 'setCreateDate()', the exception raises again;
3 - I have the same exception for LAST_UPDATE_DATE; and the calendar getTimeInMillis() doesn't return the correct date ...
I notice that in DB tables all date are number, but I don't know ho to convert in Date and how to convert a date in the correct number for OSM ...
Does anyone can help me?
thank in advanced,
Nadia
I'm working with OSM 15.50A and oracle 10.
I'm trying to create masterdata via java, in this way:
DMMasterdata cMasterdata = (DMMasterdata)WMSession.getWMSession().newElement("MASTERDATA");
cMasterdata.setValue(pdm.DB_DEFAULT_NAME, codice);
cMasterdata.setValue("CREATE_DATE",row.getDataCreazione());
cMasterdata.setCreateDate(row.getDataCreazione());
Calendar cal = Calendar.getInstance();
cal.setTime(row.getDataAggiornamento());
cMasterdata.setValue("LAST_UPDATE_DATE",cal.getTimeInMillis());
but, this peice of code produces several errors .... :-( !!
1 - I have an exception that told me that I can't update CREATE_DATE attribute ... ;
2 - even if I use the method 'setCreateDate()', the exception raises again;
3 - I have the same exception for LAST_UPDATE_DATE; and the calendar getTimeInMillis() doesn't return the correct date ...
I notice that in DB tables all date are number, but I don't know ho to convert in Date and how to convert a date in the correct number for OSM ...
Does anyone can help me?
thank in advanced,
Nadia