| Author |
how i pass recordset value to string variable
|
muhammad fahim
Ranch Hand
Joined: Dec 17, 2006
Posts: 45
|
|
hi master sir how i pass table column value into string variable see my code but not run ==== import java.sql.*; public class Waheed { public Waheed() { } public static void main (String args []) { String s = "9 23 45.4 56.7"; System.out.println ("going for connection"); // DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver()); try{ Class.forName("oracle.jdbc.driver.OracleDriver"); Connection conn = DriverManager.getConnection("jdbc racle:thin:@fahim:1521:aamir","muhammad","mfa786"); Statement stmt = conn.createStatement(); ResultSet rset = stmt.executeQuery("select accid from accbal"); System.out.println ("going for connection"); while (rset.next()) s= rset.getString("accid"); this line give me error System.out.println (rset.getString("accid")); System.out.println (s); } catch(Exception e){ e.printStackTrace(); } } } sir only this line give me error s= rset.getString("accid"); this line give me error s is string variable plese give me idea how i pass accid in s variable thank aamir
|
 |
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
|
|
|
Please provide the exact error message.
|
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
|
 |
muhammad fahim
Ranch Hand
Joined: Dec 17, 2006
Posts: 45
|
|
thank's for yur reply sir i solve that problem my next problem regarding grid how i use grid in applet becuase i have mulitpul record how i show that all record in applet grid please give me idea how i how my all record in applet grid thanks aamir
|
 |
 |
|
|
subject: how i pass recordset value to string variable
|
|
|