Page 1 of 1

Test SQL Exception

Posted: 13 Apr 2011, 12:18
by whornak
SmartFoxServer: 2X 2.0.0 RC1b
SmartFoxSerer API: SFS2X_API_AS3 2.0.0.RC1b
OpenSpace: SFS2X 2.0.3

I have pasted exactly what has been successful for so long in SFS 1.x and am getting the following error while having the Test SQL present.

Is there a difference in what the configuration should be in 2X?

Exception: com.microsoft.sqlserver.jdbc.SQLServerException
Message: The method executeQuery() cannot take arguments on a PreparedStatement or CallableStatement.
Description: The DBManager Test SQL failed
Please double check your SQL code and make sure that Database server is running.

Posted: 13 Apr 2011, 13:18
by Sigtran
Which way are you doing it code-wise?
e.g. IDBManager ::

Code: Select all

 executeQuery(String sql)
from API, which suggests that you need to pass it a string and not a prepared statement...

Posted: 13 Apr 2011, 22:10
by whornak
This is being done through configuration

Posted: 13 Apr 2011, 23:42
by Democre
What is your test SQL string?

Posted: 16 Apr 2011, 01:32
by whornak
The DB configuration, having tried it without the function as well:

<databaseManager active="true">
<driverName>com.microsoft.sqlserver.jdbc.SQLServerDriver</driverName>
<connectionString>jdbc:sqlserver://localhost:1433;DatabaseName=WizardBrewStudios;</connectionString>
<userName>userName</userName>
<password>password</password>
<testSql>SELECT COUNT(*) FROM ServerSelectTest</testSql>
<maxActiveConnections>10</maxActiveConnections>
<maxIdleConnections>10</maxIdleConnections>
<exhaustedPoolAction>FAIL</exhaustedPoolAction>
<blockTime>20</blockTime>
</databaseManager>

Posted: 27 Jun 2011, 22:12
by jimbobway
Has anyone solved this? I get the same error.