Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%//Récupérationdelaconnexion
- try{
- //configuration du driver
- Class.forName("oracle.jdbc.driver.OracleDriver");
- //CONNECTION AU SGBD
- //URL du serveur de BD
- String url = "jdbc:oracle:thin:@iutdoua-oracle.univ-lyon1.fr:1521:orcl";
- //connexion à l’URL en précisant l’utilisateur et
- // le mot de passe d’accès à la BD
- Connection connection = DriverManager.getConnection(url,user,passwd);
- Statement statement = connection.createStatement();
- ResultSet result = statement.executeQuery("select * from cpoa_personne");
- while(result.next())
- {
- texte+=(result.getInt(1)+" | "+result.getString("nompersonne")+" | "+result.getString("prenompersonne"));
- }
- } catch(Exception e){
- texte+=(e);
- }
- %>
- <%=texte%>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement