Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL related problem

Status
Not open for further replies.

wwworg

Programmer
Feb 10, 2006
35
CA
HEY GUYS

I am running a select statement. Here it is

Code:
String query = "SELECT UNITNO, UNITNAME FROM Deprartment WHERE DeptID ='" + dept + "'";
db.executeSelectQuery(query);
return db.getActionResult();

now db.getActionResult() returns a 2-dimensional String array. What I want to understand is how to use this 2-dimensional array. I mean lets say that the 2-dimensional array is called str and lets say that the select returns 2 records, what would be str[1][0]?? or what would be str[1][1]??

Thanks for your help

 
I have no idea. It COMPLETELY depends on how you are filling the 2D array. Do you understand what a 2D array actually is ?

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Each row is a record, first column is UNITNO, second is UNITNAME.

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top