-
How to retrieve the data from MySQL result set
How to retrieve the data from MySQL result set ?
-
-
try
{
Class.forName(driver).newInstance();
currentCon = DriverManager.getConnection("jdbc:mysql://192.168.27.111:3306/test");
System.out.println("Connection with Database established");
stmt=currentCon.createStatement();
rs = stmt.executeQuery("select Device from devicemaster");
System.out.println("searchQuery is executed : "+searchQuery);
while(rs.next())
{
for(int i=0;i<rs.last();i++)
{
device[i] = rs.getString(1);
}
}
}
catch (Exception ex)
{
System.out.println("Exception has occurred! " + ex);
}
-
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
Bookmarks