Bonjour à tous,
je suis en train de découvrir NetBeans (5.0), j'ai crée un appli web avec des tutoriaux.
Je veux executer une requete toute simple. Voici mon code:
Comme vous le voyez, c'est d'une simplicité...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 <% try { Class.forName("net.sourceforge.jtds.jdbc.Driver"); String url = "jdbc:jtds:sqlserver://s9/TestWeb"; Connection con = DriverManager.getConnection(url); Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery("select * from personnes"); while(rs.next()) { out.println(rs.getString("TW_Prenom") + "-" + rs.getString("TW_Name")); } } catch (Exception err) { err.printStackTrace(); } %>
Malheureusement, j'ai une exception à la 3e ligne lorsque la connexion doit etre renseignée.
Mon url et ma base sont corrects.
java.io.IOException: SSO Failed: Native SSPI library not loaded...
J'ai pourtant rajouter ma librairie jtds 1.0.3.jar à mon projet...
Si quelqu'un pouvait m'aider...merci d'avance...
Partager