dcsimg
CORBA BAD_PARAM Java IDL (1.3)
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   TwiSe_Tshwenyane
Posted On:   Thursday, April 19, 2001 11:16 AM

I'm trying to run the following corba/jdbc program using Java IDL but it raises the CORBA_BAD_PARAM. It seems to be working fine from the client to server toDBase.Its completion status is maybe.What am i missing? module mytrial{ typedef sequence cols; typedef sequence resultSet; interface MyLibrary{ resultSet viewMyBooks(in string userid);}; }; /* my server implementation*/ public String[][] viewMyBooks(String userid) { String[][] rows = null; String uid = userid; try { /* create connection,statement*/ ResultSet rs = stmt.executeQuery(query); ......Vector v = new Vector(); int numCols = rs.getMetaData().getColumnCount(); while(r   More>>

I'm trying to run the following corba/jdbc program using Java IDL but it raises the CORBA_BAD_PARAM. It seems to be working fine from the client to server toDBase.Its completion status is maybe.What am i missing?

module mytrial{
typedef sequence cols;
typedef sequence resultSet;
interface MyLibrary{ resultSet viewMyBooks(in string userid);};
};
/* my server implementation*/
public String[][] viewMyBooks(String userid)
{ String[][] rows = null;
String uid = userid;
try { /* create connection,statement*/
ResultSet rs = stmt.executeQuery(query);
......Vector v = new Vector();
int numCols =
rs.getMetaData().getColumnCount();
while(rs.next())
{String[] rowData = new Strin[numCols];
for(int i=0; i < numCols ; i++)
{ rowData[i] = rs.getString(i+1);}
v.addElement(rowData);}/*end of while*/
rows = new String[v.size()][numCols];
v.copyInto(rows);
return rows; }/*end of method defn*/
Thanks

   <<Less
About | Sitemap | Contact