Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Otros entornos y lenguajes > JAVA
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 17-12-2013
Avatar de jscubillos5
jscubillos5 jscubillos5 is offline
Miembro
NULL
 
Registrado: jul 2013
Ubicación: Bogotá
Posts: 44
Poder: 0
jscubillos5 Va por buen camino
Conexión entre JAVA e INTERBASE

Buen día gente del foro, he estado intentando programar un conexión entre JAVA e INTERBASE, con el JDBC llamado INTERCLIENT, al intentar realizar la conexión obtengo un error, las lineas de código que he programado son:

Código:
String UbicacionBase = "jdbc:odbc:ODBCPRUEBA";
        String Usuario = "SYSDBA";
        String Pasaporte = "masterkey";
        Connection Conexion = null;
        try {
            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
        } catch (ClassNotFoundException Excepcion) {
            Logger.getLogger(DemoConexionInterbase.class.getName()).log(Level.SEVERE, null, Excepcion);
        }
        try {
            System.out.println("Estableciendo conexión con: " + UbicacionBase + " espere un momento por favor...");
            Conexion = DriverManager.getConnection(UbicacionBase, Usuario, Pasaporte);
            System.out.println("Conexión establecida.");
        } catch (SQLException Excepcion) {
            MostrarExepciondelaBasedeDatos(Excepcion);
        } finally {
            try {
                Conexion.close();
            } catch (SQLException Excepcion) {
                MostrarExepciondelaBasedeDatos(Excepcion);
            }
        }
El error que obtengo es el siguiente:

debug:
Estableciendo conexión con: jdbcdbc:ODBCPRUEBA espere un momento por favor...
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000000, pid=9060, tid=10008
#
# JRE version: Java(TM) SE Runtime Environment (7.0_40-b43) (build 1.7.0_40-b43)
# Java VM: Java HotSpot(TM) Client VM (24.0-b56 mixed mode windows-x86 )
# Problematic frame:
# C 0x00000000
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Proyectos AudiSoft\Pagares desmaterializados\Recursos\AudiSoft\Demos\Interclient for JAVA\DemoConexionInterbase\hs_err_pid9060.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Java Result: 1
BUILD SUCCESSFUL (total time: 16 seconds)

Adicionalmente cree un almacen de datos ODBC, el cual es el que estoy invocando en la conexión con la siguiente configuración:

http://sdrv.ms/1kcMBi0

Quisiera saber si alguno de ustedes pudiera por favor ayudarme, ya que se escapa de mí conocimiento, y no se cual sería el error especifico.
__________________
De ante mano gracias por tomarse el tiempo de leer este Hilo.

-------------------------------
Juan Sebastián Cubillos Gonzalez
Desarrollador de soluciones informáticas.
Bogotá, Colombia.
Encuentra me en: http://www.linkedin.com/pub/juan-seb...lez/66/1b8/150
Responder Con Cita
  #2  
Antiguo 17-12-2013
Avatar de Casimiro Notevi
Casimiro Notevi Casimiro Notevi is offline
Moderador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.038
Poder: 10
Casimiro Notevi Tiene un aura espectacularCasimiro Notevi Tiene un aura espectacular
Cita:
Empezado por jscubillos5 Ver Mensaje
# An error report file with more information is saved as:
# C:\Proyectos AudiSoft\Pagares desmaterializados\Recursos\AudiSoft\Demos\Interclient for JAVA\DemoConexionInterbase\hs_err_pid9060.log
¿Ahi qué pone?
Responder Con Cita
  #3  
Antiguo 17-12-2013
Avatar de jscubillos5
jscubillos5 jscubillos5 is offline
Miembro
NULL
 
Registrado: jul 2013
Ubicación: Bogotá
Posts: 44
Poder: 0
jscubillos5 Va por buen camino
Hola Casimiro Notevi:

Lo que queda guardado en el LOG es:

#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000000, pid=9060, tid=10008
#
# JRE version: Java(TM) SE Runtime Environment (7.0_40-b43) (build 1.7.0_40-b43)
# Java VM: Java HotSpot(TM) Client VM (24.0-b56 mixed mode windows-x86 )
# Problematic frame:
# C 0x00000000
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

--------------- T H R E A D ---------------

Current thread (0x004ec400): JavaThread "main" [_thread_in_native, id=10008, stack(0x01800000,0x01850000)]

siginfo: ExceptionCode=0xc0000005, reading address 0x00000000

Registers:
EAX=0x00000000, EBX=0x0184d5b4, ECX=0x185393e8, EDX=0x0184d564
ESP=0x0184d4e0, EBP=0x1855ef30, ESI=0x18538fb9, EDI=0x1855ef34
EIP=0x00000000, EFLAGS=0x00010206

Top of Stack: (sp=0x0184d4e0)
0x0184d4e0: 183b81d7 0184d564 00000021 18538fb9
0x0184d4f0: 1855ef34 0000001a 0184d5b4 26c12218
0x0184d500: 18533eb8 18538e68 0184e678 18538ee0
0x0184d510: 00000000 18538fb9 18533f08 00000000
0x0184d520: 185388c8 1855ef30 00200000 0184d5cc
0x0184d530: 0184d5cc 0184d5cc 00000020 00000020
0x0184d540: 00000001 00000000 00000001 003a0043
0x0184d550: 0057005c 006e0069 006f0064 00730077

Instructions: (pc=0x00000000)
0xffffffe0:


Register to memory mapping:

EAX=0x00000000 is an unknown value
EBX=0x0184d5b4 is pointing into the stack for thread: 0x004ec400
ECX=0x185393e8 is an unknown value
EDX=0x0184d564 is pointing into the stack for thread: 0x004ec400
ESP=0x0184d4e0 is pointing into the stack for thread: 0x004ec400
EBP=0x1855ef30 is an unknown value
ESI=0x18538fb9 is an unknown value
EDI=0x1855ef34 is an unknown value


Stack: [0x01800000,0x01850000], sp=0x0184d4e0, free space=309k
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j sun.jdbc.odbc.JdbcOdbc.driverConnect(J[B[B)V+0
j sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JLjava/lang/StringV+93
j sun.jdbc.odbc.JdbcOdbcConnection.initialize(Ljava/lang/String;Ljava/util/Properties;I)V+984
j sun.jdbc.odbc.JdbcOdbcDriver.connect(Ljava/lang/String;Ljava/util/PropertiesLjava/sql/Connection;+129
j java.sql.DriverManager.getConnection(Ljava/lang/String;Ljava/util/Properties;Ljava/lang/ClassLjava/sql/Connection;+172
j java.sql.DriverManager.getConnection(Ljava/lang/String;Ljava/lang/String;Ljava/lang/StringLjava/sql/Connection;+37
j democonexioninterbase.DemoConexionInterbase.main([Ljava/lang/StringV+74
v ~StubRoutines::call_stub

--------------- P R O C E S S ---------------

Java Threads: ( => current thread )
0x179cf000 JavaThread "Service Thread" daemon [_thread_blocked, id=4748, stack(0x17c70000,0x17cc0000)]
0x179cb800 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=3332, stack(0x18130000,0x18180000)]
0x179bdc00 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=9820, stack(0x17fc0000,0x18010000)]
0x179b6c00 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=9236, stack(0x17c10000,0x17c60000)]
0x179ae400 JavaThread "JDWP Transport Listener: dt_shmem" daemon [_thread_blocked, id=9872, stack(0x17f50000,0x17fa0000)]
0x179a8c00 JavaThread "Attach Listener" daemon [_thread_blocked, id=7496, stack(0x17df0000,0x17e40000)]
0x179a5c00 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=5304, stack(0x17eb0000,0x17f00000)]
0x17977000 JavaThread "Finalizer" daemon [_thread_blocked, id=4472, stack(0x17d50000,0x17da0000)]
0x17971000 JavaThread "Reference Handler" daemon [_thread_blocked, id=8132, stack(0x17d00000,0x17d50000)]
=>0x004ec400 JavaThread "main" [_thread_in_native, id=10008, stack(0x01800000,0x01850000)]

Other Threads:
0x1796f400 VMThread [stack: 0x17bb0000,0x17c00000] [id=5852]
0x179e1400 WatcherThread [stack: 0x18080000,0x180d0000] [id=8880]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
def new generation total 4928K, used 747K [0x03850000, 0x03da0000, 0x08da0000)
eden space 4416K, 16% used [0x03850000, 0x0390aed0, 0x03ca0000)
from space 512K, 0% used [0x03ca0000, 0x03ca0000, 0x03d20000)
to space 512K, 0% used [0x03d20000, 0x03d20000, 0x03da0000)
tenured generation total 10944K, used 0K [0x08da0000, 0x09850000, 0x13850000)
the space 10944K, 0% used [0x08da0000, 0x08da0000, 0x08da0200, 0x09850000)
compacting perm gen total 12288K, used 1882K [0x13850000, 0x14450000, 0x17850000)
the space 12288K, 15% used [0x13850000, 0x13a26848, 0x13a26a00, 0x14450000)
No shared spaces configured.

Card table byte_map: [0x17850000,0x17900000] byte_map_base: 0x17833d80

Polling page: 0x004a0000

Code Cache [0x01850000, 0x018f8000, 0x03850000)
total_blobs=165 nmethods=24 adapters=87 free_code_cache=32111Kb largest_free_block=32882304

Compilation events (10 events):
Event: 10.496 Thread 0x179cb800 19 s java.lang.StringBuffer::append (8 bytes)
Event: 10.496 Thread 0x179cb800 nmethod 19 0x018eaf08 code [0x018eb010, 0x018eb24c]
Event: 10.498 Thread 0x179cb800 20 java.io.Win32FileSystem::normalize (231 bytes)
Event: 10.500 Thread 0x179cb800 nmethod 20 0x018eb3c8 code [0x018eb680, 0x018ecfcc]
Event: 10.500 Thread 0x179cb800 21 java.lang.String::replace (127 bytes)
Event: 10.500 Thread 0x179cb800 nmethod 21 0x018eed88 code [0x018eeea0, 0x018ef120]
Event: 10.500 Thread 0x179cb800 22 java.lang.StringBuilder::append (8 bytes)
Event: 10.500 Thread 0x179cb800 nmethod 22 0x018ef388 code [0x018ef490, 0x018ef58c]
Event: 10.500 Thread 0x179cb800 23 ! sun.net.www.ParseUtil::decode (316 bytes)
Event: 10.502 Thread 0x179cb800 nmethod 23 0x018ef6c8 code [0x018ef9c0, 0x018f0808]

GC Heap History (0 events):
No events

Deoptimization events (0 events):
No events

Internal exceptions (6 events):
Event: 0.029 Thread 0x004ec400 Threw 0x0385b190 at C:\jdk7u2_32P\jdk7u40\hotspot\src\share\vm\prims\jni.cpp:3991
Event: 0.124 Thread 0x004ec400 Threw 0x038b5030 at C:\jdk7u2_32P\jdk7u40\hotspot\src\share\vm\prims\jvm.cpp:1244
Event: 10.500 Thread 0x004ec400 Threw 0x038f5cf0 at C:\jdk7u2_32P\jdk7u40\hotspot\src\share\vm\prims\jvm.cpp:1244
Event: 10.500 Thread 0x004ec400 Threw 0x038f5e08 at C:\jdk7u2_32P\jdk7u40\hotspot\src\share\vm\prims\jvm.cpp:1244
Event: 10.502 Thread 0x004ec400 Threw 0x038f9708 at C:\jdk7u2_32P\jdk7u40\hotspot\src\share\vm\prims\jvm.cpp:1244
Event: 10.502 Thread 0x004ec400 Threw 0x038f9820 at C:\jdk7u2_32P\jdk7u40\hotspot\src\share\vm\prims\jvm.cpp:1244

Events (10 events):
Event: 16.056 loading class 0x179ec760
Event: 16.059 loading class 0x179ec760 done
Event: 16.201 loading class 0x0119d790
Event: 16.201 loading class 0x179edf08
Event: 16.202 loading class 0x179f7aa8
Event: 16.202 loading class 0x179ee930
Event: 16.202 loading class 0x179ee930 done
Event: 16.202 loading class 0x179f7aa8 done
Event: 16.202 loading class 0x179edf08 done
Event: 16.202 loading class 0x0119d790 done


Dynamic libraries:
0x00070000 - 0x0009f000 C:\Program Files\Java\jdk1.7.0_40\bin\java.exe
0x778e0000 - 0x77a1c000 C:\Windows\SYSTEM32\ntdll.dll
0x77800000 - 0x778d4000 C:\Windows\system32\kernel32.dll
0x75bd0000 - 0x75c1b000 C:\Windows\system32\KERNELBASE.dll
0x76860000 - 0x76900000 C:\Windows\system32\ADVAPI32.dll
0x76140000 - 0x761ec000 C:\Windows\system32\msvcrt.dll
0x76660000 - 0x76679000 C:\Windows\SYSTEM32\sechost.dll
0x75ca0000 - 0x75d42000 C:\Windows\system32\RPCRT4.dll
0x76680000 - 0x76749000 C:\Windows\system32\USER32.dll
0x75c50000 - 0x75c9e000 C:\Windows\system32\GDI32.dll
0x77a60000 - 0x77a6a000 C:\Windows\system32\LPK.dll
0x77a70000 - 0x77b0d000 C:\Windows\system32\USP10.dll
0x74850000 - 0x749ee000 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2\COMCTL32.dll
0x761f0000 - 0x76247000 C:\Windows\system32\SHLWAPI.dll
0x77a40000 - 0x77a5f000 C:\Windows\system32\IMM32.DLL
0x76460000 - 0x7652c000 C:\Windows\system32\MSCTF.dll
0x60b20000 - 0x60bde000 C:\Program Files\Java\jdk1.7.0_40\jre\bin\msvcr100.dll
0x60400000 - 0x60780000 C:\Program Files\Java\jdk1.7.0_40\jre\bin\client\jvm.dll
0x72f30000 - 0x72f37000 C:\Windows\system32\WSOCK32.dll
0x76080000 - 0x760b5000 C:\Windows\system32\WS2_32.dll
0x76250000 - 0x76256000 C:\Windows\system32\NSI.dll
0x739b0000 - 0x739e2000 C:\Windows\system32\WINMM.dll
0x77a20000 - 0x77a25000 C:\Windows\system32\PSAPI.DLL
0x60ad0000 - 0x60adc000 C:\Program Files\Java\jdk1.7.0_40\jre\bin\verify.dll
0x60ab0000 - 0x60ad0000 C:\Program Files\Java\jdk1.7.0_40\jre\bin\java.dll
0x6adf0000 - 0x6ae1a000 C:\Program Files\Java\jdk1.7.0_40\jre\bin\jdwp.dll
0x72010000 - 0x72017000 C:\Program Files\Java\jdk1.7.0_40\jre\bin\npt.dll
0x60a90000 - 0x60aa3000 C:\Program Files\Java\jdk1.7.0_40\jre\bin\zip.dll
0x74270000 - 0x74279000 C:\Program Files\Java\jdk1.7.0_40\jre\bin\dt_shmem.dll
0x740b0000 - 0x740be000 C:\Program Files\Java\jdk1.7.0_40\jre\bin\JdbcOdbc.dll
0x637a0000 - 0x6382c000 C:\Windows\system32\ODBC32.dll
0x69990000 - 0x699c8000 C:\Windows\system32\odbcint.dll
0x754a0000 - 0x754b7000 C:\Windows\system32\bcrypt.dll
0x75070000 - 0x750ad000 C:\Windows\system32\bcryptprimitives.dll
0x183b0000 - 0x184a1000 C:\Windows\system32\OdbcIB.dll
0x74af0000 - 0x74af9000 C:\Windows\system32\VERSION.dll
0x760c0000 - 0x7613b000 C:\Windows\system32\comdlg32.dll
0x76900000 - 0x7754a000 C:\Windows\system32\SHELL32.dll
0x75f20000 - 0x7607c000 C:\Windows\system32\ole32.dll
0x77770000 - 0x777ff000 C:\Windows\system32\OLEAUT32.dll
0x713b0000 - 0x713ce000 C:\Windows\system32\odbccp32.dll
0x18640000 - 0x18731000 C:\Program Files\Embarcadero\InterBaseODBC\Odbcib.dll
0x6efe0000 - 0x6f0cb000 C:\Windows\system32\dbghelp.dll

VM Arguments:
jvm_args: -Xdebug -Xrunjdwp:transport=dt_shmem,address=javadebug -Dfile.encoding=UTF-8
java_command: democonexioninterbase.DemoConexionInterbase
Launcher Type: SUN_STANDARD

Environment Variables:
PATH=C:\Program Files\Embarcadero\RAD Studio\12.0\bin;C:\Users\Public\Documents\RAD Studio\12.0\Bpl;C:\Program Files\Embarcadero\RAD Studio\12.0\bin64;C:\Users\Public\Documents\RAD Studio\12.0\Bpl\Win64;C:\Program Files\Embarcadero\RAD Studio\11.0\bin;C:\Users\cgutierrez\Documents\RAD Studio\11.0\Bpl;C:\Program Files\Embarcadero\RAD Studio\11.0\bin64;C:\Users\cgutierrez\Documents\RAD Studio\11.0\Bpl\Win64;C:\Program Files\CollabNet;C:\Program Files\Embarcadero\RAD Studio\10.0\bin;C:\Users\Public\Documents\RAD Studio\10.0\Bpl;C:\Program Files\Embarcadero\RAD Studio\10.0\bin64;C:\Users\Public\Documents\RAD Studio\10.0\Bpl\Win64;C:\Program Files\HP SimplePass 2011\x64;C:\Program Files\HP SimplePass 2011\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\ v1.0\;c:\Program Files\Intel\DMIX;C:\Program Files\Intel\Services\IPT\;c:\Program Files\Microsoft SQL Server\90\Tools\binn\
USERNAME=Soporte
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 6 Model 42 Stepping 7, GenuineIntel



--------------- S Y S T E M ---------------

OS: Windows 7 Build 7601 Service Pack 1

CPU:total 4 (2 cores per cpu, 2 threads per core) family 6 model 42 stepping 7, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, ht, tsc, tscinvbit

Memory: 4k page, physical 1976336k(281668k free), swap 3952672k(1655796k free)

vm_info: Java HotSpot(TM) Client VM (24.0-b56) for windows-x86 JRE (1.7.0_40-b43), built on Aug 26 2013 22:34:40 by "java_re" with unknown MS VC++:1600

time: Tue Dec 17 09:23:10 2013
elapsed time: 16 seconds
__________________
De ante mano gracias por tomarse el tiempo de leer este Hilo.

-------------------------------
Juan Sebastián Cubillos Gonzalez
Desarrollador de soluciones informáticas.
Bogotá, Colombia.
Encuentra me en: http://www.linkedin.com/pub/juan-seb...lez/66/1b8/150
Responder Con Cita
  #4  
Antiguo 17-12-2013
Avatar de Casimiro Notevi
Casimiro Notevi Casimiro Notevi is offline
Moderador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.038
Poder: 10
Casimiro Notevi Tiene un aura espectacularCasimiro Notevi Tiene un aura espectacular
¿Funciona algún otro programa en java?
Responder Con Cita
  #5  
Antiguo 17-12-2013
Avatar de jscubillos5
jscubillos5 jscubillos5 is offline
Miembro
NULL
 
Registrado: jul 2013
Ubicación: Bogotá
Posts: 44
Poder: 0
jscubillos5 Va por buen camino
Hola Casimiro, muchisimas gracias por toda tu ayuda, en java si me están funcionando otros programas, adicionalmente ya pude hacer la conexión entre JAVA e INTERBASE, por esto comprato el código para que pueda ser visualizado:

Código:
public static void main(String[] args) {
        // TODO code application logic here
        String Usuario = "SYSDBA";
        String Pasaporte = "masterkey";
        String Servidor = "//localhost/";
        String Base = "C://InterBase//PRUEBAS.IB";
        String UbicacionBase = "jdbc:interbase:" + Servidor + Base;
        Connection Conexion = null;
        Statement Sentencia = null;
        ResultSet ResultadosdeDatos = null;
        ResultSetMetaData MetaDatos = null;
        try {
            Class.forName("interbase.interclient.Driver");
        } catch (ClassNotFoundException Excepcion) {
            Logger.getLogger(DemoConexionInterbase.class.getName()).log(Level.SEVERE, null, Excepcion);
        }
        try {
            System.out.println("Estableciendo conexión con: " + UbicacionBase + " espere un momento por favor...");
            Conexion = DriverManager.getConnection(UbicacionBase, Usuario, Pasaporte);
            System.out.println("Conexión establecida.");
        } catch (SQLException Excepcion) {
            MostrarExepciondelaBasedeDatos(Excepcion);
        }
        try {
            Sentencia = Conexion.createStatement();
            String Consulta = "SELECT * FROM Demo;";
            System.out.println("Ejecutando la consulta: " + Consulta);
            ResultadosdeDatos = Sentencia.executeQuery(Consulta);
        } catch (SQLException Excepcion) {
            MostrarExepciondelaBasedeDatos(Excepcion);
        }
        try {
            MetaDatos = ResultadosdeDatos.getMetaData();
            System.out.println("La consulta tiene: " + MetaDatos.getColumnCount() + " columnas");
            for (int i = 1; i <= MetaDatos.getColumnCount(); i++) {
                System.out.println("La columna se llama: " + MetaDatos.getColumnName(i) + " y es del tipo " + MetaDatos.getColumnTypeName(i) + " el valor de la columna es: ");
            }
        } catch (java.sql.SQLException Excepcion) {
            MostrarExepciondelaBasedeDatos(Excepcion);
        } finally {
            System.out.println("Cerrando el acceso a todos los recursos....");
            try {
                if (ResultadosdeDatos != null) {
                    ResultadosdeDatos.close();
                }
            } catch (java.sql.SQLException e) {
                MostrarExepciondelaBasedeDatos(e);
            }
            try {
                if (Sentencia != null) {
                    Sentencia.close();
                }
            } catch (java.sql.SQLException e) {
                MostrarExepciondelaBasedeDatos(e);
            }
            try {
                if (Conexion != null) {
                    Conexion.close();
                }
            } catch (java.sql.SQLException e) {
                MostrarExepciondelaBasedeDatos(e);
            }
        }
    }

    private static void MostrarExepciondelaBasedeDatos(java.sql.SQLException e) {
        java.sql.SQLException Siguiente = e;
        while (Siguiente != null) {
            System.out.println(Siguiente.getMessage());
            System.out.println("Código del error: " + Siguiente.getErrorCode());
            System.out.println("Estado del SQL: " + Siguiente.getSQLState());
            Siguiente = Siguiente.getNextException();
        }
    }
}
Adicionalmente es importante descargar el JDBC de INTERBASE llamado INTERCLIEnt, que viene en la instalación gratuita de INTERBASE para desarrolladores: https://downloads.embarcadero.com/free/ibdeve.

Con este problema resuelto, tengo otra duda, con que propiedad pude obtener el valor de la fila consultada, ya que he podido obtener, nombre, tipo, precisión, pero no encuentro la propiedad que me permite obtener el valor como tal de la consulta???, alguno de ustedes me podria decir que propiedad es??.
__________________
De ante mano gracias por tomarse el tiempo de leer este Hilo.

-------------------------------
Juan Sebastián Cubillos Gonzalez
Desarrollador de soluciones informáticas.
Bogotá, Colombia.
Encuentra me en: http://www.linkedin.com/pub/juan-seb...lez/66/1b8/150
Responder Con Cita
  #6  
Antiguo 18-12-2013
blackx5n blackx5n is offline
Miembro
 
Registrado: feb 2008
Posts: 51
Poder: 17
blackx5n Va por buen camino
Wink

Hola

Por lo que dices, ya lograste hacer la conexion con la base de datos interbase, ahora tu problema es que no tienes el resultado de la consulta.

Tienes esto asi:

Código Delphi [-]
try {
            Sentencia = Conexion.createStatement();
            String Consulta = "SELECT * FROM Demo;";
            System.out.println("Ejecutando la consulta: " + Consulta);
            ResultadosdeDatos = Sentencia.executeQuery(Consulta);
        } catch (SQLException Excepcion) {
            MostrarExepciondelaBasedeDatos(Excepcion);

Para que te muestre el resultado de tu consulta realiza esto:

Código Delphi [-]
try {
            Sentencia = Conexion.createStatement();
            String Consulta = "SELECT * FROM Demo;";
            System.out.println("Ejecutando la consulta: " + Consulta);
            ResultadosdeDatos = Sentencia.executeQuery(Consulta);
            
             // Lectura de la BD
            while (ResultadosdeDatos.next())
            {
                   int tipo=ResultadosdeDatos.getInt("tipo");
                   String nombre=ResultadosdeDatos.getString("nombre");
                   System.out.println(tipo+"  "+nombre);
            }

        } catch (SQLException Excepcion) {
            MostrarExepciondelaBasedeDatos(Excepcion);

Puedes probar tambien Firebird y Java solo te descargas el driver para conectar con la BD

http://www.firebirdsql.org/en/jdbc-driver/

Salud2
Responder Con Cita
  #7  
Antiguo 23-07-2014
uper uper is offline
Miembro
 
Registrado: abr 2004
Posts: 296
Poder: 21
uper Va por buen camino
Asi es, prueba con firebird, llevo un mes adentrandome al mundo java y todo va bien aunque algunos metodos son distintos pero el resulado es el mismo, yo use interbase 6.0 cuando fue liberado y cuando le cargabamos muchas conexiones como que no reaccionaba o se dañana la base despues de dias y aunque le dedicamos un pc solo para la base, aunque como sabemos, nos enloquecemos por tener el maximo rendimiento sobre windows y no lo es asi, no se que tanto checa o verifica el windows, sera que tiene varios procesos siempre ejecutandose.
Despues comence a probar con linux en servidor y con firebird 2.1, y hay va, y por migrar a otro servidor de BD es similar el IB a FB.
Responder Con Cita
  #8  
Antiguo 03-08-2014
Gallosuarez Gallosuarez is offline
Miembro
 
Registrado: feb 2007
Posts: 92
Poder: 18
Gallosuarez Va por buen camino
Talking Sugerencia .... recomendación ...

Saludos a tod@s:

Aunque tuve éxito con algunos "Frameworks" (MyBatis, JPA, Spring-MyBatis), siempre tuve problemas al momento de querer hacer cosas más "sofisticadas", como conectarme con usuarios que no fueran SYSDBA o al momento de utilizar "roles" o al utilizar procedimientos almacenados, excepciones o al querer utilizar los eventos asíncronos desde Firebird.

Después de varias pruebas, los mejores resultados los he obtenido utilizando JDBC (Jaybird-2.2.5JDK1.8 ... ver https://www.ibphoenix.com/download/connectivity/java).
Básicamente, utilizo tres clases que se comunican entre ellas y POJOS para contener los datos que se obtengan de la sentencias SQL.
-Una clase para conectarme (aquí utilizo DBPool para poder manejar un "pool" de conexión ... ver http://www.snaq.net/java/DBPool/)
-Utilizo otra clase que denomino Mapper (Aquí enlazo las sentencias SQL con los POJOS en JAVA)
-Y una tercera clase que denomino Service (Aquí ejecuto las sentencias a la base de datos en una sola transacción, muy conveniente para el manejo de transacciones atómicas para evitar problemas en las tablas maestro-detalle y otros beneficios que te da este patrón de diseño).

Espero que esta información les sirva de algo.
Saludos,
Gerardo Suárez Trejo
Responder Con Cita
Respuesta


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Conexión java y firebird v 2.1.3 dant JAVA 1 30-07-2010 21:25:15
Conectar BD Interbase con Java K-ba JAVA 1 31-08-2007 19:17:48
interbase y java carloz69 Firebird e Interbase 1 08-03-2007 21:27:54
Comunicacion entre Java y Delphi davezf Providers 4 03-11-2006 19:25:01
Conexion con SQL Server y java Angel_Luz Conexión con bases de datos 0 24-04-2006 22:24:12


La franja horaria es GMT +2. Ahora son las 23:07:45.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi