How to set values for String Column using ROWSET
Hello,
This is my first post to this forum.
I am trying to launch the reports developed in crystal Reports 10 in IBM Websphere 6.0 with Linux server.
I successfully launched the reports developed in Crystal Reports XI in Websphere environment.
When i am trying the same in Crystal Reports 10 version,i am facing the problem.The problem i wil explain it.
1.I am using rowset.jar file for forming disconnected recordset.
2.My data will be in XML.
3.I am trying to form an disconnected recordset using rowset.jar and assigning the values to the recordset.
4.I am able to assign values to all integer columns.When i am trying to do the same for string columns its not accepting.
5.I am using java.sql.Types for defining DataType for the columns in Disconnected recordset.
e.g.
owMeta.setColumnCount(1);
rowMeta.setColumnName(1,"empname");
//Here iam specifying java.sql.types
rowMeta.setColumnType(1,12);
CachedRowSet crs = new CachedRowSetImpl();
crs.setTableName("MyTable");
crs.setMetaData(rowMeta);
crs.setFetchDirection(ResultSet.FETCH_FORWARD);
crs.setType(ResultSet.TYPE_SCROLL_INSENSITIVE);
crs.setConcurrency(ResultSet.CONCUR_UPDATABLE);
crs.moveToInsertRow();
crs.updateString(1,"test");
6.here i am using string datatype.Now i am facing the problem.
7.If i use
rowMeta.setColumnType(1,4);//For Integer
i wont get any problem report launched with data.
Please tell me the solution if anyone knows.
|