Test SQL Exception

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

whornak
Posts: 86
Joined: 22 Sep 2009, 11:05

Test SQL Exception

Postby whornak » 13 Apr 2011, 12:18

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.
Sigtran
Posts: 56
Joined: 10 Mar 2011, 15:54
Location: Ireland

Postby Sigtran » 13 Apr 2011, 13:18

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...
whornak
Posts: 86
Joined: 22 Sep 2009, 11:05

Postby whornak » 13 Apr 2011, 22:10

This is being done through configuration
Democre
Posts: 77
Joined: 16 Sep 2010, 17:58

Postby Democre » 13 Apr 2011, 23:42

What is your test SQL string?
whornak
Posts: 86
Joined: 22 Sep 2009, 11:05

Postby whornak » 16 Apr 2011, 01:32

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>
jimbobway
Posts: 20
Joined: 26 Oct 2010, 15:57

Postby jimbobway » 27 Jun 2011, 22:12

Has anyone solved this? I get the same error.

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 10 guests