PDA

View Full Version : JDBC:[973] Invalid Database--


fede_uno
07-17-02, 07:02
i am using filemaker developer 5.5 under mac os x as database system and i am trying to access it with the following Java code

import java.sql.*;

public class ProvaSql {

public static void main(String[ ] args)
{

try
{
Connection fmpConnection = null;
// loading the driver FMPJDBC
Class.forName("com.fmi.jdbc.JdbcDriver");
// estabilish connection

fmpConnection = DriverManager.getConnection("jdbc:fmpro://localhost/Dipendenti.fp5" );


Statement fmpStatement =fmpConnection.createStatement();

ResultSet resultSet = fmpStatement.executeQuery("select * from \"Dipendenti.fp5\" where department = 'engineering' ");
System.out.println("Engineering Department");
while (resultSet.next())
System.out.println(resultSet.getString("cognome") + ", " + resultSet.getString("nome"));
}

catch(ClassNotFoundException classNotFoundException)
{
System.out.println("error in loading the driver");
}

catch(SQLException sqlException)
{
System.out.println("JDBC Error:" + sqlException.getMessage());
}
}


}

IS THE SYNTAX CORRECT?
PLEASE GIVE ME AN HELP

THANK YOU VERY MUCH
Fede

bharath28
12-15-03, 11:24
can anyone help me in getting the "Fmpjdbc12.jar" file. I am desperately looking for that.
Please some one help me out in this regard.
Reply me back to pbharath_iitm@yahoo.co.in

Thanks,
Bharath

Originally posted by fede_uno
i am using filemaker developer 5.5 under mac os x as database system and i am trying to access it with the following Java code

import java.sql.*;

public class ProvaSql {

public static void main(String[ ] args)
{

try
{
Connection fmpConnection = null;
// loading the driver FMPJDBC
Class.forName("com.fmi.jdbc.JdbcDriver");
// estabilish connection

fmpConnection = DriverManager.getConnection("jdbc:fmpro://localhost/Dipendenti.fp5" );


Statement fmpStatement =fmpConnection.createStatement();

ResultSet resultSet = fmpStatement.executeQuery("select * from \"Dipendenti.fp5\" where department = 'engineering' ");
System.out.println("Engineering Department");
while (resultSet.next())
System.out.println(resultSet.getString("cognome") + ", " + resultSet.getString("nome"));
}

catch(ClassNotFoundException classNotFoundException)
{
System.out.println("error in loading the driver");
}

catch(SQLException sqlException)
{
System.out.println("JDBC Error:" + sqlException.getMessage());
}
}


}

IS THE SYNTAX CORRECT?
PLEASE GIVE ME AN HELP

THANK YOU VERY MUCH
Fede