Skip to main content
1-Visitor
April 8, 2019
Solved

Need help with connection to MS SQL extension

  • April 8, 2019
  • 1 reply
  • 2002 views

Imported "MSSQLConnector_Extension" and copy the file "sqljdbc42.jar" into the folder ...\Tomcat 8.5\lib.

 

For the configuration of Database Thing based on the ThingTemplate from the JDBC extension 

JDBC Driver Class Name: com.microsoft.sqlserver.jdbc.SQLServerDriver
JDBC Connection String: jdbc:sqlserver://localhost:1433;databaseName=thingworx01;applicationName=Thingworx
connectionValidationString: SELECT GETDATA();

 

Ensure the admin and password is valid.

When testing service "GetAllRecords: select * from table01", failed. "Unable to Invoke Service GetAllRecords on MSSQLDatabase : null"

 

Best answer by posipova

Are you referring to this extnsion? https://marketplace.ptc.com/apps/195356/jdbc-connector-extension#!overview

If so, please note it's not supported and provided in as-is condition. I'd recommend obtaining a needed driver and creating your own extension per instructions I provided here  https://community.ptc.com/t5/ThingWorx-Developers/Using-a-third-party-Jar-file-for-Database-connection/m-p/514861?author_id=269584&collapse_discussion=true&filter=authorId&q=jdbc&search_type=thread

1 reply

posipova20-TurquoiseAnswer
20-Turquoise
April 8, 2019

Are you referring to this extnsion? https://marketplace.ptc.com/apps/195356/jdbc-connector-extension#!overview

If so, please note it's not supported and provided in as-is condition. I'd recommend obtaining a needed driver and creating your own extension per instructions I provided here  https://community.ptc.com/t5/ThingWorx-Developers/Using-a-third-party-Jar-file-for-Database-connection/m-p/514861?author_id=269584&collapse_discussion=true&filter=authorId&q=jdbc&search_type=thread

jgu121-VisitorAuthor
1-Visitor
April 9, 2019

change the connectionValidationString from SELECT GETDATA() to SELECT 1, then it works successfully.