Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7070 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have created a simple contact database in order to learn about JDBC programming.

Three tables...

Names

Phones

PhoneTypes

So far I have been able to connect to the database. However when I try to execute a SQL command, I receive the following error...

[DataDirect][sequeLink JDBC Driver][ODBC Socket][DataDirect][ODBC FileMaker driver][FileMaker]Parse Error in SQL

I know the statement I'm executing in correct it is simply

SELECT * FROM NAMES

my goal is just to retrieve data for testing purposes.

My database is set to share via ODBC/JDBC, the account I log in with has full access to the db, and I've just downloaded the lasted JDBC driver.

My java code is...

package databaseConnection;

import java.sql.*;

public class JdbcTest {

public static void main(String[] args) {

Connection con;

Statement s;

ResultSet rs;

Driver d;

try {

d = (Driver)Class.forName("com.ddtek.jdbc.sequelink.SequeLinkDriver").newInstance();

con = DriverManager.getConnection("jdbc:sequelink://localhost:2399;serverDataSource=Contacts;user=craig;password=craig");

s = con.createStatement();

rs = s.executeQuery("SELECT FIRSTNAME FROM NAMES");

if (rs != null){

while (rs.next()){

System.out.println(rs.getString(1));

}

}

}catch (Exception e){

System.out.println(e);

}

}

}

and I've attached my FM DB

Does anyone know what is going on?

Contacts.zip

Posted

Problem solved, as usual I was the culprit...

I had downloaded the last xDBC drivers and plugin, but I hadn't replaced my plugin in the FM extensions folder.

After I did so, it works great.

This topic is 7070 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.