Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Remoting / April 2007



Tip: Looking for answers? Try searching our database.

ResultSet - RowSet - RecordSet

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cyberluna - 13 Apr 2007 16:09 GMT
Hi there,
I'm a newbie to Flash Remoting.  I'm having difficulty transferring a result
set to flash using an intermittent rowset, can anyone help?
The result to flash is null with either of the implementations (commented &
uncommented).

import java.sql.*;
import javax.sql.rowset.CachedRowSet;
import com.sun.rowset.CachedRowSetImpl;

public class JavaClassService {
    public ResultSet getResultSet(){
        Connection connection = null;
        try{

            Class.forName( "com.mysql.jdbc.Driver" );
            connection = DriverManager.getConnection(
"jdbc:mysql://localhost/test", "root", "space7107");
            Statement stmt = connection.createStatement();
            ResultSet resultset = stmt.executeQuery("SELECT * FROM testdata");
            CachedRowSet crs = new CachedRowSetImpl();
            //crs.setUsername("root");
            //crs.setPassword("space7107");
            //crs.setUrl("jdbc:mysql://localhost/test");
            //crs.setCommand("SELECT * FROM testdata");
            //crs.execute();
            crs.populate(resultset);
            resultset.close();
            stmt.close();
            connection.close();
            return crs;
        }catch(Exception e){

        }finally{
            try{
                if(connection!= null && !connection.isClosed()) connection.close();
            }catch(SQLException e){}

            }
        return null;

    }
}
cyberluna - 16 Apr 2007 15:21 GMT
In case anyone has this problem - Sun 1.5 is required to use CachedRowset - I
had been trying to use 1.4 and the rowset.jar, which wasn't working. Both
commented&uncommented java code work fine with flash remoting.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.