Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
J2SBridge
Last updated at 12:55 pm UTC on 17 January 2006
J2SBridge is a library and a little java server which makes JDBC (Java Database
Connectivity) available for Squeak. Virtually every database has a JDBC driver, which
differentiates this to ODBC. Currently, Strings, Integers (32bit twos-complement) and
Binary objects (Blobs) are supported.
A sample illustrates how to use J2SBridge:

	|con table |

con:=(DBConnection new)
      connectToHost: 'localhost' 
      port: 1444 
      driverName:  'com.mysql.jdbc.Driver'
      url: 'jdbc:mysql:///test'
      user:'frank'
      password:'geheim'.
		


table:=con simpleQuery:'select * from sttest'.

[table next] whileTrue:[
	Transcript show:'name=',(table getString:'name'),' zahl=',
                                (table getInt32:'zahl') printString;cr.
].

con disConnect.


Download

Find a tar.gz file here: http://www.fgerlach.com/J2SBridge.tar.gz
Unpack the tar file (Winzip does the job on Windows) and then load J2SBridge-fg.3.mcz
using Monticello. After that use runBridge.sh to start the java server.

Feedback

Do not hesitate to write me at frankgerlach@gmail.com. Comments, help and other feedback
is welcome.