|
Hi there!
I am working on this project on ND5 with Oracle 8i
as database. As a part of work, I am required to insert user-input values into
the database. These values are to be inserted into different tables.
I am using semi-automatic mode of ND transaction
for this purpose. As far as my knowledge of ND API goes, it requires a CSpValue
variable for the value. However, the work requires calculation of a field value
(a alphanumeric string). I am not been able to convert this String value into
CSpValue.
e.g.
We are asking the user user-name and password.
Thus, we can have these in CSpValue. However, while inserting into the table, we
are giving it a unique alphanumeric code, which we calculate while
inserting.
We are using the code similar to following
:
CSpInsert mnInsert =
(CSpInsert)CSpider.getDataObject("doMNInsert");
mnInsert.setValue(0,NameFieldValue); mnInsert.setValue(1,PasswordValue); mnInsert.setValue(2,"CalculatedValue"); //Problem
probably lies here
CSpTransaction tr = new
CSpTransaction();
tr.addDataObject(mnInsert);
int command = tr.execute(); if(tr.succeeded() && (command != STOP_PROCESSING)) { CSpHtml.write("Operation Successful..."); } Upon compilation and running of project, when
button is clicked, it throws exception, saying :
Please help me out.
Is my approach right?
Thanx.
Rajneesh
|
- Re: [ND] Insertion Query and CSpValues Rajneesh Garg
- Re: [ND] Insertion Query and CSpValues Aby Mathew
- Re: [ND] Insertion Query and CSpValues peter cheung
