Hi .. friends.. in the below program
where s1,s2 are String Data Types
in the above program i got the sql error as Data type mismatch criteria.. i know that the problem is with data types..can u say wat kind of data type i have to declare to solve this problem...
Thanking you....
Regards
Pradeep
Code:
public void actionPerformed(ActionEvent ae)
{
int flag=0;
s1=(from.getText());
s2=(to.getText());
if(ae.getSource()==view)
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:prism");
stmt=con.createStatement();
stmt1=con.createStatement();
rs=stmt.executeQuery("select SUM(NOSRECEIVED),SUM(REJPCS) from Visual where DATE BETWEEN '"+s1+"' AND '"+s2+"' ");
rs1=stmt1.executeQuery("select SUM(D1),SUM(D2),SUM(D3),SUM(D4),SUM(D5),SUM(D6),SUM(D7),SUM(D8),SUM(D9),SUM(D10),SUM(D11),SUM(D12),SUM(D13) FROM Rej where DATE BETWEEN'"+s1+"'AND '"+s2+"'");
}
in the above program i got the sql error as Data type mismatch criteria.. i know that the problem is with data types..can u say wat kind of data type i have to declare to solve this problem...
Thanking you....
Regards
Pradeep
Comment