SQL Query not working

I am trying to populate a drop down with available tables in a database.

in management studio I can use this query:

SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES

When I bind that to the data property of the drop down box I get this error:

Huh, thats weird. SQL Type code -9 isn’t defined. What JDBC driver and version of SQL Server are you using? (These “type codes” are defined in java.sun.com/j2se/1.5.0/docs/api … Types.html )

I was on a development laptop using SQL express 2008 with the new driver sqljdbc4.jar. I ended up switching back to the old driver that came with FactoryPMI. The query now works.

Oh, yeah, you can't use that jar file. Note the instructions I posted upgrading to the SQL server driver:

i.e. not sqljdbc4.jar.

You should be able to go back to the official SQL Server driver, just use the other jar file.

I had tried that initially, but I receive this error on the datasource page.

Ack, ok, I wasn’t expecting that. Do you get that if you start the Gateway using Java 5? (You can switch the path to jvm.dll in the registry for the Gateway under HKLM\SYSTEM\CurrentControlSet\Services\FactoryPMI\Parameters\JVM Library)

I’ll have to do some experimentation…

Yes jre 5 update 19 works.

Ok, thats good to know. Thanks for the feedback.