Search code examples
ibm-mobilefirstworklight-adapters

IBM Worklight 6.1 - Failed connecting to MS SQL using SQL adapter


I am trying to connect my adapter to a SQL Server 2012 Express database, but I can't quite get it right. I have downloaded a connector from here: http://msdn.microsoft.com/en-us/sqlserver/aa937724.aspx, and added it to the server\lib folder in Worklight Studio.

My definitions looks as follows:

<dataSourceDefinition>
   <driverClass>com.microsoft.sqlserver.jdbc.SQLServerDriver</driverClass
   <url>jdbc:sqlserver://localhost:1433;database=MyDB</url>
   <user>MyUser</user>
   <password>MyPassword</password>
</dataSourceDefinition>

The driver class seems to be right, but the URL don't. Can anyone point me in the right direction?

PS. My environment is as follows, worklight 6.1, jre7u45, windows 8, SQL Server 2012 Express.


Solution

  • Regarding the connection error, see if the following will help: