• Post Reply Bookmark Topic Watch Topic
  • New Topic

What IP address do i use.

 
ismail lunat
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to connect SQL Server 2000 from the local machine. It is behind a router. If The IP adress i get is: 196.258.130.27 and local IP as 10.0.0.3
what Do i use for <Host> in the following code in java:

DriverManager.registerDriver(new
com.microsoft.jdbc.sqlserver.SQLServerDriver());
Connection connection = DriverManager.getConnection(
"jdbc:microsoft:sqlserver://<Host>:1433",<"UID>","<PWD>");

also am using Windows login settings to login to the DB, what do i use for UID and PWD.
 
Masoud Kalali
Author
Ranch Hand
Posts: 531
Java Mac OS X Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you should use the remote computer IP address. 196.258.130.27
sql server should be in mixed mode authentication ,, because from JDBC drivers
you can not authenticate with Windows . (when last i used it was impossible to authenticate with windows and we used a mixed mode authentication.)
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!