Desktop productivity for business analysts and programmers

SAS connectivity with JAVA

Reply
N/A
Posts: 0

SAS connectivity with JAVA

Hi,
I have a piece of code to connect to SAS data set i have taken the drivers provided by SAS and the below code is giving error saying server not accepting userid/password but with that userid and password i can connect to SAS in other applications can any body suggest what's wrong with this.


Driver driver=(Driver) Class.forName("com.sas.net.sharenet.ShareNetDriver").newInstance();
System.out.println("Driver loaded");

System.out.println("JDBC:"+driver.jdbcCompliant());
String url="jdbc:sharenet://164.56.174.116:8591";
Properties credentials=new Properties();
credentials.put("user","userName");
credentials.put("password","Password");
Connection connection=driver.connect(url,credentials);
System.out.println("Connection made");
connection.close();
System.out.println("Connection closed");



i am getting this error

Exception in thread "main" java.sql.SQLException: Sharenet.S58.ex.txt: Sharenet.S279.ex.txt: Sharenet.S06.ex.txt: Userid/Password not accepted by server...
at com.sas.net.sharenet.ShareNetConnection.(ShareNetConnection.java:219)
at com.sas.net.sharenet.ShareNetDriver.connect(ShareNetDriver.java:165)
Ask a Question
Discussion stats
  • 0 replies
  • 211 views
  • 0 likes
  • 1 in conversation