IBM Worklight 6.1 - Failed connecting to MS SQL us

2019-03-02 08:43发布

问题:

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.

回答1:

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