LIBD:Contact

Affichages
De LIBD.
(Différences entre les versions)
 
(7 révisions intermédiaires par un utilisateur sont masquées)
Ligne 8 : Ligne 8 :
 
:B-5000 Namur - Belgium
 
:B-5000 Namur - Belgium
  
'''Accès/Access''': [http://www.fundp.ac.be/universite/acces Français]  [http://www.fundp.ac.be/en/access English]
+
'''Accès/Access''': [http://http://www.unamur.be/universite/acces Français]  [http://www.unamur.be/en/access English]
  
  
* Jean-Luc Hainaut (e-mail: jean-luc.hainaut AT fundp.ac.be)
+
* Jean-Luc Hainaut (e-mail: jean-luc.hainaut AT unamur.be)
  
* Vincent Englebert (e-mail: vincent.englebert AT fundp.ac.be)
+
* Vincent Englebert (e-mail: vincent.englebert AT unamur.be)
  
* Anne-France Brogneaux (''e-mail'': anne-france.brogneaux AT fundp.ac.be)
+
* Anthony Cleve (''e-mail'': anthony.cleve AT unamur.be)
  
* Julie Louette (''e-mail'': julie.louette AT fundp.ac.be)
 
  
* Jonathan Lemaitre (''e-mail'': jonathan.lemaitre AT fundp.ac.be)
 
  
* Ravi Ramdoyal (''e-mail'': ravi.ramdoyal AT fundp.ac.be)
 
  
* Rokia Bendaoud (''e-mail'': rokia.bendaoud AT fundp.ac.be)
+
<!--
  
* Anthony Cleve (''e-mail'': anthony.cleve AT fundp.ac.be)
+
'''''Please ignore the following section'''''
  
* Jean Henrard (''e-mail'': jean.henrard AT rever.eu)
+
'''Comparing SQLfast and Java/JDBC'''<br>
 +
The SQLfast code (here just a simple SQL query) is executed at level 0 (Learning SQL), when database ORDERS.db has been opened. Error exceptions are coped with automatically.
 +
{|
 +
|<div style="width: 260px;height:300px;padding-left:5px;padding-top:1px;background-color:#E5E5E5;">
 +
<code><font color="blue">'''select''' NCLI,NOM '''from CLIENT''';</font></code><br>
 +
</div>
 +
|<div style="width:420px;height:300px;padding-left:5px;padding-top:1px;background-color:#E5E5E5;overflow:auto;">
 +
<code>import java.net.URL;</code><br>
 +
<code>import java.io.*;</code><br>
 +
<code>import ...;</code><br>
 +
<code>import java.sql.*;</code><br>
 +
<code>import java.util.*;</code><br>
 +
<code>String url = "jdbc:interbase://server1/CLICOM.gdb";</code><br>
 +
<code>String user ="myLogin";</code><br>
 +
<code>String pw="myPassword";</code><br>
 +
<code>Connexion conn = null;</code><br>
 +
<code>Statement stmt = null;</code><br>
 +
<code>ResultSet res = null;</code><br>
 +
<code>String selectQ = <font color="blue">"'''select''' NCLI,NOM '''from''' CLIENT"</font>;</code><br>
 +
<code>String CiD;</code><br>
 +
<code>String Cnom;</code><br>
  
* Didier Roland (''e-mail'': didier.roland AT rever.eu)
+
<code>try {</code><br>
 
+
<code>&nbsp;&nbsp;&nbsp;&nbsp;Class.forName("interbase.interclient.Driver");</code><br>
* Jean-Marc Hick (''e-mail'': jean-marc.hick AT rever.eu)
+
<code>&nbsp;&nbsp;&nbsp;&nbsp;conn = DriverManager.getConnection(url,user,pw);</code><br>
 
+
<code>&nbsp;&nbsp;&nbsp;&nbsp;}</code><br>
* Virginie Detienne
+
<code>catch (Exception e) {</code><br>
 
+
<code>&nbsp;&nbsp;&nbsp;&nbsp;System.err.println( e.getClass().getName()</code><br>
* Frédéric Vesentini (''e-mail'': frederic.vesentini AT uclouvain.be)
+
<code>&nbsp;&nbsp;&nbsp;&nbsp;+ ": " + e.getMessage() );</code><br>
 +
<code>&nbsp;&nbsp;&nbsp;&nbsp;System.exit(0);</code><br>
 +
<code>&nbsp;&nbsp;&nbsp;&nbsp;}</code><br>
  
 +
<code>try {</code><br>
 +
<code>&nbsp;&nbsp;&nbsp;&nbsp;stmt = conn.createStatement ();</code><br>
 +
<code>&nbsp;&nbsp;&nbsp;&nbsp;res = stmt.executeQuery (selectQ);</code><br>
 +
<code>&nbsp;&nbsp;&nbsp;&nbsp;System.out.println("NCLI, NOM");</code><br>
 +
<code>&nbsp;&nbsp;&nbsp;&nbsp;while (res.next()) {</code><br>
 +
<code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CiD = res.getString("NCLI");</code><br>
 +
<code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cnom = res.getString("NOM");</code><br>
 +
<code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(CiD + ", " + Cnom);</code><br>
 +
<code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</code><br>
 +
<code>&nbsp;&nbsp;&nbsp;&nbsp;res.close();</code><br>
 +
<code>&nbsp;&nbsp;&nbsp;&nbsp;stmt.close();</code><br>
 +
<code>&nbsp;&nbsp;&nbsp;&nbsp;conn.close();</code><br>
 +
<code>&nbsp;&nbsp;&nbsp;&nbsp;}</code><br>
 +
<code>catch (Exception e) {</code><br>
 +
<code>&nbsp;&nbsp;&nbsp;&nbsp;System.err.println( e.getClass().getName()</code><br>
 +
<code>&nbsp;&nbsp;&nbsp;&nbsp;+ ": " + e.getMessage() );</code><br>
 +
<code>&nbsp;&nbsp;&nbsp;&nbsp;}</code><br>
 +
</div>
 +
|}
 +
-->
  
 
[[Accueil|<''Retour à la page d'accueil / Back''>]]
 
[[Accueil|<''Retour à la page d'accueil / Back''>]]

Version actuelle en date du 21 décembre 2015 à 13:42

Contact


Address/Adresse

PReCISE / LIBD
Faculté d'informatique
Rue Grandgagnage, 21
B-5000 Namur - Belgium

Accès/Access: Français English


  • Jean-Luc Hainaut (e-mail: jean-luc.hainaut AT unamur.be)
  • Vincent Englebert (e-mail: vincent.englebert AT unamur.be)
  • Anthony Cleve (e-mail: anthony.cleve AT unamur.be)



<Retour à la page d'accueil / Back>

Outils personnels