Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
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
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Duplicate of https://coderanch.com/t/344031/GUI/java/pass-recordset-value-string-variable - closing...
 
    Bookmark Topic Watch Topic
  • New Topic