Hi,
I cannot see in the code why the test table should happen. The code
(org.apache.torque.task.TorqueJDBCTransformTask)is like this:
.....
// Attemtp to connect to a database.
Connection con = DriverManager.getConnection(dbUrl, dbUser, dbPassword);
log("DB connection established");
// Get the database Metadata.
DatabaseMetaData dbMetaData = con.getMetaData();
// The database map.
List tableList = getTableNames(dbMetaData);
.....
and getTableNames(dbMetaData) looks like:
public List getTableNames(DatabaseMetaData dbMeta)
throws SQLException
{
log("Getting table list...");
List tables = new ArrayList();
ResultSet tableNames = null;
// these are the entity types we want from the database
String[] types = {"TABLE", "VIEW"};
try
{
tableNames = dbMeta.getTables(null, dbSchema, "%", types);
while (tableNames.next())
{
String name = tableNames.getString(3);
String type = tableNames.getString(4);
tables.add(name);
}
}
finally
{
if (tableNames != null)
{
tableNames.close();
}
}
return tables;
}
Could you please create a small test case including the above code and
debug it in order to see wyh the test table is not in the tableList ?
Thomas
Trey Long <[EMAIL PROTECTED]> schrieb am 28.07.2005 15:27:53:
> Torque Version: 3.2-rc1
> Using: ANT, MSSQL
>
> I have managed to get Torque working with MSSQL by setting the
> {torque.database.schema} variable to the owner of the database. I am
> running the MSSQL Profiler which tells me all of the sql commands run
> through the server. Torque uses the following command to list tables:
>
> sp_tables '%', 'dbo', null, "'TABLE','VIEW'"
>
> Which returns:
> bookstore dbo dtproperties TABLE NULL
> bookstore dbo test TABLE NULL
> bookstore dbo sysconstraints VIEW NULL
> bookstore dbo syssegments VIEW NULL
>
> Yet, for some reason that I haven't been able to figure out it only
> processes 'dtproperties', 'syscontraints' and 'syssegments'. The 3
> tables I really DON'T want.
>
> I have listed the output log here to help with understanding what is
> going on.
>
> [torque-jdbc-transform] Torque - JDBCToXMLSchema starting
> [torque-jdbc-transform] Your DB settings are:
> [torque-jdbc-transform] driver :
> com.microsoft.jdbc.sqlserver.SQLServerDriver
> [torque-jdbc-transform] URL :
> jdbc:microsoft:sqlserver://localhost:1433;SelectMethod=cursor
> [torque-jdbc-transform] user : torque
> [torque-jdbc-transform] schema : dbo
> [torque-jdbc-transform] DB driver sucessfuly instantiated
> [torque-jdbc-transform] DB connection established
> [torque-jdbc-transform] Getting table list...
> [torque-jdbc-transform] Building column/table map...
> [torque-jdbc-transform] Processing table: dtproperties
> [torque-jdbc-transform] Processing table: sysconstraints
> [torque-jdbc-transform] Processing table: syssegments
> [torque-jdbc-transform] ~edit~src/schema/schema.xml
> [torque-jdbc-transform] Torque - JDBCToXMLSchema finished
>
> If anyone could shed some light on this, I would be immensely grateful.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]