namespace hello; interface uses java.sql.*; type Hello = class public class method Main(args: array of String); end; implementation class method Hello.Main(args: array of String); var conn: Connection; stmt: Statement; rs: ResultSet; begin java.lang.Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); conn := DriverManager.getConnection("jdbc:sqlserver://;server=localhost", "sa", "P@ssW0rd"); stmt := conn.createStatement(); rs := stmt.executeQuery("SELECT 'Hello, JDBC Type4 World!' AS Message"); while rs.next() do begin System.out.println( rs.getString(1) ); end; rs.close(); stmt.Close(); conn.Close(); end; end.