I've been googling this for the last 3 hours, and I've had no luck. I'm trying to connect to a SQL Server 2008 with Java, which I normally access with SQL Management Studio. It's windows authenticated too, so it's not like I enter a username or password.
The two relevent lines of code:
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
Connection conn = DriverManager.getConnection(db_connect_string, db_userid, db_password);
What I want to know is:
What am I supposed to put in for Class.forName? I just downloaded the latest JDBC. Yes I've looked around. Most sites tell me what it is, and why I need to set it, rather than what I need to set.
Where do I define a class path, and what do I define it as? I've googled this, and I can't find anything that tells me WHERE I set this.
Since it's a windows authenticated system, what do I use for db_connect_string, db_userid, and db_password? I'm assuming db_connect_string is localhost, right (if it's a local database)?
I'm not very well versed with any of this, so an explanation would be really appreciated!