Requested operation not supported on forward only result set

I’ve been working on this for hours but couldn’t get loading data through connector to work - I am using Java and Microsoft SQL Server.

On client side, I simply do: mainGrid.load(“grid.data”); “grid.data” points to my connector servlet - I have verified that the servlet does get called.

Following is my definition of connector servlet, not that different from the document’s sample. I was able to verify that database connection is established (through commons logging). Also, I have “connector.js” included in my jsp. In the connector log file, the error message is:

Error during data selecting
Invalid SQL: SELECT id,email,first_name,last_name FROM customers
The requested operation is not supported on forward only result sets.

Seems that’s a harmless query - is there a way for me to indicate that I want scrollable result sets? Or it’s probably some other method that can help? Thanks!

package springapp.service;

import java.sql.Connection;
import java.sql.DriverManager;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.dhtmlx.connector.*;

public class CustomersConnector extends ConnectorServlet {

protected final Log logger = LogFactory.getLog(getClass());

@Override
protected void configure() {
            //obtain DB connection
	Connection conn=null;
	try {
		Class.forName ("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance ();
		//DriverManager.registerDriver(new com.microsoft.sqlserver.jdbc.SQLServerDriver());
		conn = DriverManager.getConnection("jdbc:sqlserver://localhost\\SQLEXPRESS;databaseName=HibernateDev;","sa","1234");
		logger.info("Got here - the connector is connected to the database !!!!!!!!");
	} catch (Throwable e) {
		e.printStackTrace();
	}

	logger.info("Got here inside the CustomersConnector servlet!!!!!!!!");

        //Initialize connector
	GridConnector gc = new GridConnector(conn);
	gc.enable_log("gridconn.log", false);

        //configure used table and fields
	gc.render_table("customers", "id", "first_name,last_name,email");
}

}

Please try to use the updated jar file instead of the original one
dhtmlxconnector.zip (113 KB)

Thank you for the file. It turns out I need to specify database type when I initialize a GridConnector object if I am not using Mysql. It would be great for other people if you can make it clear in the tutorial.

Also - where can I find the server side code for DataProcessor? Thanks!

There is no such thing as “server side dataprocessor”
DataProcessor is a client side lib , which communicate with server side.
On server side you can implement your own solution, or use Connectors lib, which supports dataprocessor data sending protocol.