bonjours tout le monde;
Voila le code source :
J'utilise Netbeans, windows XP comme SE.
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
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48 import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.sql.*; import javax.sql.*; public class om { public om() { try { Driver driver; try { driver = (Driver) Class.forName("org.firebirdsql.jdbc.FBDriver").newInstance(); DriverManager.registerDriver(driver); } catch (IllegalAccessException ex) { ex.printStackTrace(); } catch (InstantiationException ex) { ex.printStackTrace(); } catch (ClassNotFoundException ex) { ex.printStackTrace(); } System.out.println("coucou414141"); System.out.println("123456"); DriverManager.getConnection("jdbc:InterBase://localhost/C:/GESTION.GDB","SYSDBA","avR23#["); Connection conn = DriverManager.getConnection("jdbc:firebirdsql:localhost/3050:/c:/gestion.gdb", "sysdba", "avR23#["); System.out.println("coucou"); } catch ( SQLException se ) { System.err.println("Exception creating the database connection: "+se.getMessage()); } } public static void main (String args[]) {om o=new om(); } }
Le message d'erreur est mis dans l'objet :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 GDS Exception. 335544721. Unable to complete network request to host "localhost"
Partager