Newsgrupos.com  

Retroceder   Newsgrupos.com > Forum > Newsgroup es.comp.lenguajes.* Foro > Newsgroup es.comp.lenguajes.java
Registrarse Preguntas Frecuentes Lista de Foreros Calendario Buscar Temas de Hoy Marcar Foros Como Leídos




Respuesta
 
LinkBack Herramientas Desplegado
  #1 (permalink)  
Antiguo 12-05-2008, 20:02:12
Junior Member
 
Fecha de Ingreso: May 2008
Mensajes: 1
Predeterminado SOS!!!!! Problema en conexion acess y java

Hola temgo un examen el viernes y he intentado hacer un ejemplo para probar y me da un error al conectar alguien me podria decir donde falla este codigo.


public ArrayList openConection(){
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con= DriverManager.getConnection("jdbcdbcepe","","" );
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT user FROM login");
ArrayList lista = new ArrayList();
int i=0;
while(rs.next()){
lista.add(rs.getString(i));
i++;
}
rs.close();
stmt.close();
return lista;
} catch (SQLException ex) {
//Error de conexion con la base de datos
} catch (ClassNotFoundException ex) {
ex.printStackTrace();
}
return null;

no se por que no hace nada.

Última edición por Supertorpez fecha: 13-05-2008 a las 18:20:35.
Responder Con Cita
Alt Today
Advertising
Google Adsense
 
This advertising will not be shown
in this way to registered members.
Register your free account today
and become a member on
Newsgrupos.com
Standard Sponsored Links

Respuesta


Herramientas
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
Trackbacks are habilitado
Pingbacks are habilitado
Refbacks are habilitado


Temas Similares
Tema Autor Foro Respuestas Último mensaje
Re: Favor Enrique Problema con conexión java Enrique [MVP Windows] Newsgroup microsoft.public.es.ie6 1 19-07-2008 20:25:45
ASP.NET y ACESS Vipper Newsgroup microsoft.public.es.dotnet.aspnet 0 18-02-2008 10:44:00
ASP.NET y ACESS Vipper Newsgroup microsoft.public.es.dotnet.aspnet 0 18-02-2008 10:44:00
Acess LuisMa Newsgroup microsoft.public.es.pocketpc 0 25-01-2006 20:02:59
Acess LuisMa Newsgroup microsoft.public.es.pocketpc 0 25-01-2006 20:02:59





Powered by: vBulletin, Versión 3.6.8
Derechos de Autor ©2000 - 2008, Jelsoft Enterprises Ltd.

LinkBacks Enabled by vBSEO 3.1.0 © 2007, Crawlability, Inc.