);=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 car Set ) ;. printStackTrace ();
}
}
//======================================== ==================== void updateCar (int IDCar, String Model, int NumPas, String Number, String Color, int IDDriver)
{conn=null; .sql.Statement S=null; result=null; rs=null;
sql=new StringBuffer () ;. append ( call C_Update(raquo;);.append(IDCar);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(Model);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(NumPas);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(Number);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(Color);.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)
{. err.println ( Error in car Set ) ;. printStackTrace ();
}
}
//======================================== ==================== void driverSet (String FName, String LName, String MName, String Telephone, String Addres, int Online, int Bysy)
{conn=null; .sql.Statement S=null; result=null; rs=null;
sql=new StringBuffer () ;. append ( call DR_Set(raquo;);.append(laquo;laquo;raquo;);.append(FName);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(LName);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(MName);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(Telephone);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(Addres);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(Online);.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 driver Set ) ;. printStackTrace ();
}
}
//======================================== ==================== void updateDriver (int IDDriver, String FName, String LName, String MName, String Telephone, String Addres)
{conn=null; .sql.Statement S=null; result=null; rs=null;
sql=new StringBuffer () ;. append ( call DR_Update(raquo;);.append(IDDriver);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(FName);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(LName);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(MName);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(Telephone);.append(laquo;raquo;raquo;);.append(laquo;,raquo;);.append(laquo;laquo;raquo;);.append(Addres);.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 driver Set ) ;. printStackTrace ();
}
}
//======================================== ==================== void driverSetBysy (int IDDriver, int Bysy)
{conn=null; .sql.Statement S=null; result=null; rs=null;