Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Java mewbe/student - ms sql connectionstring login failed for user(Trouble connecting to ms sql database remotly )
Java mewbe/student - ms sql connectionstring login failed for user [message #1717945] Fri, 18 December 2015 04:22 Go to next message
Ricky Stambach is currently offline Ricky StambachFriend
Messages: 1
Registered: December 2015
Junior Member
I'm trying to make a program to connect to a remote ms sql database to test and learn how to using the following code.

// Create a variable for the connection string.
String connectionUrl = "jdbc:sqlserver://;Initial" +
"Catalog=test2;Persist Security Info=True;User ID=rsmobile;Password=xxxx";

// Declare the JDBC objects.
Connection con = null;
Statement stmt = null;
ResultSet rs = null;

try {
// Establish the connection.
con = DriverManager.getConnection(connectionUrl);

I may have something wrong in my syntax. I can connect to the table from ms ssms. The database name is test2 and the table name is TestTable2. I get the following error. Login failed for user ''. ClientConnectionId:

Re: Java mewbe/student - ms sql connectionstring login failed for user [message #1718027 is a reply to message #1717945] Fri, 18 December 2015 15:50 Go to previous message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3071
Registered: July 2009
Senior Member
These forums are for questions specifically about using Eclipse, not general programming advice. Try for general programming Q&A.
Previous Topic:Eclipse doesn't start after installing german language pack
Next Topic:Using New Installer on Mac
Goto Forum:

Current Time: Fri Sep 20 03:47:54 GMT 2019

Powered by FUDForum. Page generated in 0.03126 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top