Dear all,
I'm still trying to get a connection via torque to a database. This database
contains about 20 files so I thought that the following code would give me
all the file names, but unfortunately it doesn't. It noly gives ID_TABLE. In
my data base logging (I'm using postgres) I see that a connection is being
made, but it stops immediatly saying 'unexpected EOF from the client'. Can
somebody please tell me what I'm doing wrong. I hereby send you my code and
a part of the Torque.properties file which I use in Torquae.init().
public class TestScheduler{
public static void main (String[] args) {
try {
Torque.init("~/Torque.properties");
System.out.println("database name =
"+Torque.getDefaultDB());
Torque.getConnection(Torque.getDefaultDB());
DatabaseMap dbm =
Torque.getDatabaseMap(Torque.getDefaultDB());
TableMap[] tm = dbm.getTables();
for (int i = 0;i<tm.length;i++) {
System.out.println(tm[i].getName());
} // end of for (int i = 0;i<tm.length;i++))
} catch (Exception e) {
e.printStackTrace();
} // end of catch
} // end of main ()
}
torque.database.default=square
#torque.database.default.driver=sun.jdbc.odbc.JdbcOdbcDriver
torque.database.square.driver=org.postgresql.Driver
torque.database.square.url=jdbc:postgresql://pcg801l/erik_square
torque.database.square.username=myusername
torque.database.square.password=mypasswd
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>