IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

JDBC Java Discussion :

Lister sources ODBC, ma méthode ne marche que sous Win 2k


Sujet :

JDBC Java

  1. #1
    Membre du Club
    Inscrit en
    Février 2006
    Messages
    174
    Détails du profil
    Informations forums :
    Inscription : Février 2006
    Messages : 174
    Points : 62
    Points
    62
    Par défaut Lister sources ODBC, ma méthode ne marche que sous Win 2k
    Bonjour,

    le programme que je débugue actuellement implémente un système pour lister les sources de données ODBC installées sur la machine de la manière suivant:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    try {
    				Vector listenomsources= new Vector();
     
    				for(Enumeration listesources = OdbcManager.getUserDataSources();listesources.hasMoreElements();)
    				{					
    					OdbcDataSource source =  (OdbcDataSource)listesources.nextElement();
    					String nomsource = source.getName();
    					listenomsources.add(nomsource);
    					nom.addItem(nomsource);
    				}
    				return listenomsources;
    Les programmeurs ont utilisé un driver Servertec:
    import stec.sfc.Win32.OdbcDataSource;
    import stec.sfc.*;
    import stec.sfc.Win32.OdbcManager;
    import stec.sfc.Win32.Win32Exception;

    Mais ça génère une exception:
    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
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    Servertec (R) Foundation Classes Version 1.3.3 09/04/2005 Open Source Release
    Copyright (C) 2001-2005 Servertec. All rights reserved.
     
    Exception occurred during event dispatching:
    java.lang.UnsatisfiedLinkError: no sfc_w2k in java.library.path
    	at java.lang.ClassLoader.loadLibrary(Unknown Source)
    	at java.lang.Runtime.loadLibrary0(Unknown Source)
    	at java.lang.System.loadLibrary(Unknown Source)
    	at stec.sfc.Win32.sfc.init(Unknown Source)
    	at stec.sfc.Win32.OdbcManager.<clinit>(Unknown Source)
    	at gui.ConnexionDialog.RecupDataSources(ConnexionDialog.java:265)
    	at gui.ConnexionDialog.actionPerformed(ConnexionDialog.java:221)
    	at javax.swing.JComboBox.fireActionEvent(Unknown Source)
    	at javax.swing.JComboBox.setSelectedItem(Unknown Source)
    	at javax.swing.JComboBox.setSelectedIndex(Unknown Source)
    	at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(Unknown Source)
    	at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
    	at java.awt.Component.processMouseEvent(Unknown Source)
    	at javax.swing.JComponent.processMouseEvent(Unknown Source)
    	at javax.swing.plaf.basic.BasicComboPopup$1.processMouseEvent(Unknown Source)
    	at java.awt.Component.processEvent(Unknown Source)
    	at java.awt.Container.processEvent(Unknown Source)
    	at java.awt.Component.dispatchEventImpl(Unknown Source)
    	at java.awt.Container.dispatchEventImpl(Unknown Source)
    	at java.awt.Component.dispatchEvent(Unknown Source)
    	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    	at java.awt.Container.dispatchEventImpl(Unknown Source)
    	at java.awt.Window.dispatchEventImpl(Unknown Source)
    	at java.awt.Component.dispatchEvent(Unknown Source)
    	at java.awt.EventQueue.dispatchEvent(Unknown Source)
    	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    	at java.awt.Dialog$1.run(Unknown Source)
    	at java.awt.Dialog$3.run(Unknown Source)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.awt.Dialog.show(Unknown Source)
    	at gui.ConnexionDialog.<init>(ConnexionDialog.java:183)
    	at gui.GUIDiscretisation.actionPerformed(GUIDiscretisation.java:180)
    	at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    	at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    	at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    	at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
    	at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
    	at java.awt.Component.processMouseEvent(Unknown Source)
    	at javax.swing.JComponent.processMouseEvent(Unknown Source)
    	at java.awt.Component.processEvent(Unknown Source)
    	at java.awt.Container.processEvent(Unknown Source)
    	at java.awt.Component.dispatchEventImpl(Unknown Source)
    	at java.awt.Container.dispatchEventImpl(Unknown Source)
    	at java.awt.Component.dispatchEvent(Unknown Source)
    	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    	at java.awt.Container.dispatchEventImpl(Unknown Source)
    	at java.awt.Window.dispatchEventImpl(Unknown Source)
    	at java.awt.Component.dispatchEvent(Unknown Source)
    	at java.awt.EventQueue.dispatchEvent(Unknown Source)
    	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    	at java.awt.EventDispatchThread.run(Unknown Source)
    Au vu de la première ligne, j'ai l'impression que le driver ne marche pas sous XP. Je suis allé sur le site de Servertec mais aucune mise à jour.

    Ce qu'ils ont fait marche à priori sur Windows 2000. J'ai bien enregistré des sources de données ODBC sur mon poste sous XP SP2.

    Il y a le driver jdbc.odbc mais je n'ai rien trouvé qui m'expliquerait simplement comment lister les sources odbc (je veux lister les sources de données, pas les manipuler).

  2. #2
    Membre du Club
    Inscrit en
    Février 2006
    Messages
    174
    Détails du profil
    Informations forums :
    Inscription : Février 2006
    Messages : 174
    Points : 62
    Points
    62
    Par défaut
    Un petit up

Discussions similaires

  1. Barre de progression ne marche que sous FF
    Par Onyrio dans le forum Général JavaScript
    Réponses: 3
    Dernier message: 15/12/2011, 23h25
  2. que pensez vous de ce code (Création source ODBC)
    Par aimer_Delphi dans le forum Débuter
    Réponses: 1
    Dernier message: 26/05/2010, 14h47
  3. lister sources ODBC
    Par selmaK dans le forum JDBC
    Réponses: 0
    Dernier message: 17/07/2009, 16h42
  4. [Safari] Safari 3.0.2b - même rendu sous mac que sous win ?
    Par titoumimi dans le forum Développement OS X
    Réponses: 9
    Dernier message: 28/06/2007, 21h32
  5. sources de données ODBC sous win 2000
    Par drinkmilk dans le forum Windows Serveur
    Réponses: 3
    Dernier message: 02/06/2005, 14h00

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo