Jump to content

dwanehollands

Newbies
  • Posts

    2
  • Joined

  • Last visited

dwanehollands's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. sure thing man first load the the driver d = (Driver)Class.forName("com.ddtek.jdbc.sequelink.SequeLinkDriver").newInstance(); you can either do it that way of set the system property and use the driver manager to load the driver System.setProperty("jdbc.drivers","com.ddtek.jdbc.sequelink.SequeLinkDriver"); en = DriverManager.getDrivers(); while (en.hasMoreElements()) { d = (Driver)en.nextElement(); sb.append(d.getClass().getName()); } k, once u have the driver get the connection Connection con = DriverManager.getConnection("jdbc:sequelink://127.0.0.1:2399","Username","Password"); witht the above url im hosting the database on the same machine as my java app and the port number is 2339 and now that u have the conection u can execute sql statements a few things that might help u..... make sure the driver (jar file i forget its name) is in the class path or u will get a class loading exception .... Make sure the filemaker database is running when you try and connect ....i know i know... but it got me a couple of times and that should be it ohh and make sure that JDBC shareing is turned on kool well have fun
  2. Hey all i am trying to download a picture from a container field in a FMP7 database ... i checked the conversions from filemaker types to JDBC sql types and Container converts to BLOG so after connecting to the databas i executed the following code public void executeSQL(String statement){ try{ Statement stat = con.createStatement(); ResultSet result; System.out.println(stat.execute("SELECT thing FROM TEMP")); result = stat.getResultSet(); result.next(); ResultSetMetaData md = result.getMetaData(); System.out.println(md.getColumnName(1)); System.out.println(md.getColumnType(1)); while(result.wasNull() != true){ Blob blob = result.getBlob(1); System.out.println(result.getFetchSize() + "records"); result.next(); } result.close(); stat.close(); } catch(Exception e){ System.out.println("Error executing sql: " + e); } } So anyway the problems is that the driver doesnt read the contained as a blob it reads it as a VARCHAR so i get a cast exception can anyone tell me what im doing wrong thanks in advance
×
×
  • Create New...

Important Information

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