Need Urgent help please

I want to pull events from the DB based on a String say xy =12.How do i pass the this value xy=12 to the servlet to run the select command
select * from tablename where xy=12 ?
Please explain appropriate steps in java

Thanks in Advance

If you are using connectors

[code]public class Scheduler_BasicConnector extends ConnectorServlet {
String key="";
/* (non-Javadoc)
* @see com.dhtmlx.connector.ConnectorServlet#configure()
*/
@Override
protected void configure() {
Connection conn= ( new DataBaseConnection()).getConnection();
SchedulerConnector c = new SchedulerConnector(conn);
c.render_sql(select * from tablename where xy="+key,“event_id”,“start_date,end_date,event_name,details”,"","");
}

@Override
public void doGet(HttpServletRequest req, HttpServletResponse res)
		throws ServletException, IOException {
	
	key = req.getParameter("xy");
	super.doGet(req, res);
}

}[/code]

render_sql return null pointer?? i must order de columns or something?

render_sql works the same as render table, except it allows to use sql instead of table name ( in case of very complex sql it may fail )

my table have this fields

table:
events(event_id,event_name,start_date,end_date,details,id_paciente)

my sql query is
select event_id,event_name,start_date,end_date,details from events where id_paciente=1362

here my java code…

@Override
protected void configure() {

        Connection conn= ( new DataBaseConnection()).getConnection();
        SchedulerConnector c = new SchedulerConnector(conn);
        c.enable_log("c://scheduler.log", true);
        c.access.deny(OperationType.Insert);
        c.access.deny(OperationType.Update);
        c.access.deny(OperationType.Delete);
       
        c.render_sql("select event_id,event_name,start_date,end_date,details from events where id_paciente=1362","event_id","start_date,end_date,event_name,details","","");
}

and showme this error

Apache Tomcat/5.5.26 - Error report

HTTP Status 500 -


type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

java.lang.NullPointerException
    com.dhtmlx.connector.DBDataWrapper.getStatement(DBDataWrapper.java:336)
    com.dhtmlx.connector.DBDataWrapper.query(DBDataWrapper.java:351)
    com.dhtmlx.connector.DBDataWrapper.select(DBDataWrapper.java:214)
    com.dhtmlx.connector.BaseConnector.render(BaseConnector.java:308)
    com.dhtmlx.connector.BaseConnector.render_sql(BaseConnector.java:262)
    EventsBasicConnector.configure(EventsBasicConnector.java:38)
    com.dhtmlx.connector.ConnectorServlet.doGet(ConnectorServlet.java:28)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:143)
    org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

note The full stack trace of the root cause is available in the Apache Tomcat/5.5.26 logs.


Apache Tomcat/5.5.26

and scheduler.log show me…

====================================
Log started, Wed Oct 06 11:42:41 VET 2010

DB query
SELECT * FROM events WHERE id_paciente=1362

my mysql password is wrong sorry all works ok… :blush: