gn="justify"> sql=new StringBuffer () ;. append ( call DR_SetBysy(raquo;);.append(IDDriver);.append(laquo;,raquo;);.append(Bysy);.append(laquo;);raquo;);
{. forName ( com.mysql.jdbc.Driver ). newInstance ();=DriverManager.getConnection (DB_HOST, DB_USER, DB_PASSWORD);=conn.createStatement ();
. out.println (sql);
=S.executeQuery (sql.toString ());=result.getMetaData ();
. out.println ( Database connection established ) ;. close ();
} catch (Exception e)
{. err.println ( Error in SetBysy ) ;. printStackTrace ();
}
}
//======================================== ==================== void driverSetOnline (int IDDriver, int Online)
{conn=null; .sql.Statement S=null; result=null; rs=null;
sql=new StringBuffer () ;. append ( call DR_SetOnline(raquo;);.append(IDDriver);.append(laquo;,raquo;);.append(Online);.append(laquo;);raquo;);
{. forName ( com.mysql.jdbc.Driver ). newInstance ();=DriverManager.getConnection (DB_HOST, DB_USER, DB_PASSWORD);=conn.createStatement ();
. out.println (sql);
=S.executeQuery (sql.toString ());=result.getMetaData ();
. out.println ( Database connection established ) ;. close ();
} catch (Exception e)
{. err.println ( Error in SetOnline ) ;. printStackTrace ();
}
}
//======================================== ==================== void rateSet (int Tariff, String DateOn, String DateOff)
{conn=null; .sql.Statement S=null; result=null; rs=null;
sql=new StringBuffer () ;. append ( call R_Set(raquo;);.append(Tariff);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(DateOn);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(DateOff);.append(laquo;raquo;raquo;);.append(laquo;);raquo;);
{. forName ( com.mysql.jdbc.Driver ). newInstance ();=DriverManager.getConnection (DB_HOST, DB_USER, DB_PASSWORD);=conn.createStatement ();
. out.println (sql);
=S.executeQuery (sql.toString ());=result.getMetaData ();
. out.println ( Database connection established ) ;. close ();
} catch (Exception e)
{. err.println ( Error in Rate Set ) ;. printStackTrace ();
}
}
//======================================== ==================== void updateRate (int IDRate, int Tariff, String DateOn, String DateOff)
{conn=null; .sql.Statement S=null; result=null; rs=null;
sql=new StringBuffer () ;. append ( call R_Update(raquo;);.append(IDRate);.append(laquo;,raquo;);.append(Tariff);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(DateOn);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(DateOff);.append(laquo;raquo;raquo;);.append(laquo;);raquo;);
{. forName ( com.mysql.jdbc.Driver ). newInstance ();=DriverManager.getConnection (DB_HOST, DB_USER, DB_PASSWORD);=conn.createStatement ();
. out.println (sql);
=S.executeQuery (sql.toString ());=result.getMetaData ();
. out.println ( Database connection established ) ;. close ();
} catch (Exception e)
{. err.println ( Error in Rate Set ) ;. printStackTrace ();
}
}
//======================================== ==================== void shiftSet (int Shift, String TimeOn, String TimeOff, int IDDriver)
{conn=null; .sql.Statement S=null; result=null; rs=null;
sql=new StringBuffer () ;. append ( call S_Set(raquo;);.append(Shift);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(TimeOn);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(TimeOff);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(IDDriver);.append(laquo;);raquo;);
{. forName ( com.mysql.jdbc.Driver ). newInstance ();=DriverManager.getConnection (DB_HOST, DB_USER, DB_PASSWORD);=conn.createStatement ();
. out.println (sql);
=S.executeQuery (sql.toString ());=result.getMetaData ();
. out.println ( Database connection established ) ;. close ();
} catch (Exception e) ...