Archive for the ‘ SmartFox Server ’ Category

SmartFox and SQL Server 2005 Connection

For Java 1.6

Downloaded Microsoft SQL Server JDBC Driver 3.0

copy sqljdbc4.jar to SmartFoxServerPRO_1.6.6\jre\lib\ext

Remove sqljdbc.jar or else error while starting server to put sqljdbc4.jar

Change config.xml for zone you need to create extension for.

<DatabaseManager active=”true”>

<Driver>com.microsoft.sqlserver.jdbc.SQLServerDriver</Driver>
<ConnectionString>jdbc:sqlserver://;serverName=yourip;databaseName=dbname</ConnectionString>

<UserName>username</UserName>
<Password>password</Password>

<TestSQL><![CDATA[SELECT COUNT(*) FROM Game]]></TestSQL>

<MaxActive>10</MaxActive>
<MaxIdle>10</MaxIdle>

<OnExhaustedPool>fail</OnExhaustedPool>
<BlockTime>5000</BlockTime>

</DatabaseManager>

Set your connection type to active=true in order to excute DB ..

check sample application from smartfoxServerDoc