-
CORBA/JDBC
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<string> cols;
typedef sequence<cols> 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
Result Set rs = stmt.executeQuery(query);
......................................................
Vector v = new Vector();
int numCols = rs.getMetaData().getColumnCount();
while(rs.next())
{ String[] rowData = new String[numCols];
for(int i=0; i < numCols ; i++)
{rowData[i] = rs.getString(i+1);}
v.addElement(rowData);
}
rows = new String[v.size()][numCols];
v.copyInto(rows);
return rows; }//end of method defn
Thanks
Metaele.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks