Skip to main content
Windward

Using RunReport Command Line with Microsoft SQL Server JDBC Connector

Overview

Below you will see how to use the RunReport Command Line utility that ships with the Windward Java Engine to connect to a Microsoft SQL Server via a JDBC driver connection.

Resolution

The RunReport command line application uses JDBC to make a connection to your Microsoft SQL Server database. 

 

Here is an example of how you could run the RunReport command line application using a Microsoft SQL Server database, passing in the server, database name, user name and password:

 

java net.windward.xmlreport.RunReport mssql_template.docx mssql_output.docx -sql:DATABSOURCENAME "//SERVERNAME_OR_URL;DatabaseName=DATABSENAME;Username=USERNAME;Password=PASSWORD"

 

Example Connection

Server:                            mssql.windward.net

Database:                      AdventureWorks

Database Nickname:  AdventureWorks (set when you create the DB connection in AutoTag, in the nickname field)

Username:                    demo

Password:                     demo

 

java net.windward.xmlreport.RunReport mssql_template.docx mssql_output.docx -sql:AdventureWorks "//mssql.windward.net;DatabaseName=AdventureWorks;Username=demo;Password=demo"

 

NOTE: You must have the Microsoft SQL Server JDBC Connector JAR file in your CLASSPATH, otherwise the connection will fail.  At the time of this writing, the current version of the Microsoft SQL Server JDBC connector is sqljdbc4.jar

 

  • Was this article helpful?