Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialITAY GAZIT
12,159 Pointshow to define connection string to sql server in Spark framework?
I have used the following and it does not work for me :-( String connectionString = "jdbc:sqlserver//localhost;databaseName=AndroidTourist;integratedSecurity=true;";
1 Answer
Livia Galeazzi
Java Web Development Techdegree Graduate 21,083 PointsDo I understand correctly that you're trying to connect to a Microsoft SQL Server with Spark?
Firstly JDBC is a Java standard and not compatible with Microsoft SQL Server by default. Have you installed and configured the JDBC driver? If not go to to this page: https://docs.microsoft.com/en-us/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server Follow the steps in the "Getting Started section", then try again.
How do you connect to the database? Are you using Sql2o?