Remember that your CLASSPATH should contain jdbc driver for PostgreSQL and dot (.) indicating current directory. Property file pro2jdbc.properties is located in current directory and Java search for property files in CLASSPATH.
Prepare file go.bat cointaining something like that:
Put your encoding instead of windows-1250 and point .jar file with JDBC driver.
Compile and start:
C:\Java> go Pro2JdbcServer
Prepare file go cointaining something like that:
Compile and start:
# go Pro2JdbcServer
Channel is open...
pro2jdbc.p usage:
Important notice: After executing jdbcExecuteQuery() you have to retrieve all records using jdbcGetRecord() - otherwise they would be waiting in TCP/IP buffer so subsequent calls might be scrambled.
Each record is returned as a single string containing tab separated list of field values. If a field is null then it is returned as question mark (?).
In case of an error returned string begins with "SQL_EXCEPTION " followed by error message.
Only 'select' are supported at the moment, however handling 'insert', 'update' and 'delete' will not be a problem.