Lothar Krenzien wrote: >Hi there, > >I've used MiddlegenIDE in the past with MySQL without any problem. But now I >have to use MSSQL 2000 Server. When I try to connect to a database on the >remote server nothing happens. No errors but no tables are displayed ! I tried >it with native MSSQL jdbc driver and also with some commercial drivers with no >success. Does anybody else knows of this ? Is it a problem of Microsoft ? >
Specify the schema and catalog in the properties file you pass into the ant task. Also make sure that the login you use had permissions to access those tables. Double check by using the SQL Query Manager, and create a new connection to test that youo can access the data. MySQL and PostgreSQL do not necessarily need these values. I have a middlegen task like this:- <property file="${resource.dir.sqlserver}/build.properties"/> <!-- password sensitive data etc will live in here--> <target name="middlegen.hibernate.mapping.sqlserver" description="Generate Hibernate Mapping Files from the DB" unless="middlegen.skip" depends="prepare"> <mkdir dir="${hbm.gen.sqlserver.dir}"/> <middlegen appname="${app.name}" prefsdir="${resource.dir.sqlserver}" databaseurl="${database.sqlserver.url}" driver="${database.sqlserver.driver}" username="${database.sqlserver.username}" password="${database.sqlserver.password}" schema="${database.sqlserver.schema}" catalog="${database.sqlserver.catalog}" > <!-- Plugins --> <hibernate destination="${hbm.gen.sqlserver.dir}" package="com.xxx.data.dto" genXDocletTags="true" genIntegratedCompositeKeys="true" /> </middlegen> </target> And this in the build.properties file database.sqlserver.schema=dbo database.sqlserver.catalog=DBName database.sqlserver.username=dbo database.sqlserver.password=password database.sqlserver.driver=net.sourceforge.jtds.jdbc.Driver database.sqlserver.url=jdbc:jtds:sqlserver://localhost:1433/DBName database.sqlserver.dialect=net.sf.hibernate.dialect.SQLServerDialect I'd also advise that you use JTDS as your JDBC driver. Find it at Sourceforge. It works very well in production here. Hope that helps, i'm rather snowed under here right now! Regards, James. ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ middlegen-user mailing list middlegen-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/middlegen-user