Tema: Ayuda
Ver Mensaje Individual
  #3 (permalink)  
Antiguo 19/08/2008, 14:32
itinajero
 
Fecha de Ingreso: marzo-2008
Ubicación: Zacatecas
Mensajes: 45
Antigüedad: 16 años, 10 meses
Puntos: 1
Respuesta: Ayuda

Que tal Bunburyscom.

Ya le hice como me dijiste y me sigue marcando otro error

Este es el codigo completo PruebaConexion.java

import saaf.db.*;
import java.sql.*;

class PruebaConexion
{
public void testConexion()
{
Statement stmt_consul=null;
dbconn cn = new dbconn("localhost","saaf","root","mypass");
Connection myconn = cn.getConexion();
stmt_consul=myconn.createStatement();
//Cerrar conexion
cn.CerrarConexion();
System.out.println(myconn);
}
public static void main (String [] args)
{
testConexion();
}
}

************************************************** ***
AHora me marca este error

C:\javaivan>javac PruebaConexion.java
PruebaConexion.java:18: non-static method testConexion() cannot be referenced from a static context
testConexion();
^
1 error

Que me faltara, espero me puedas ayudar