File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes how pass record value in string variable and how return record value to applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply locked New topic
Author

how pass record value in string variable and how return record value to applet

muhammad fahim
Ranch Hand

Joined: Dec 17, 2006
Posts: 45
hi master
sir i am new in jawa
sir my need is i want send data to applet form class
i have accid filed of accbal table

please see my codee
=====
import java.sql.*;

public class Waheed {
public String ttl;
public Waheed() {
}

public static void main (String args [])
{
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())
System.out.println (rset.getString("accid"));

1.. ttl=rset.getString("accid"); =========this line give me err
rstrun ttl
2.. rstrun rset.getString("accid"); =====this line give me error

}
catch(Exception e){
e.printStackTrace();
}
}
}

sir
these two line give me error

1.. ttl=rset.getString("accid"); =========this line give me err
2.. rstrun rset.getString("accid"); =====this line give me error



sir how i send accid column data to applet

pleae give me idea
thank
aamir
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Duplicate of http://www.coderanch.com/t/344031/GUI/java/pass-recordset-value-string-variable - closing...


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
 
wood burning stoves
 
subject: how pass record value in string variable and how return record value to applet