Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sqlServer connection

 
omar bili
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, i want to create a connection with
sqlServer can someone tell me what are
the steps that i shoul do .
thx for any help
 
Julian Kennedy
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Go find yourself a SQL Server JDBC driver. Microsoft's or Sybase's websites (depending on which SQL Server) would be a good start. Then read the instructions it comes with and come back here if you have problems.

Jules
 
omar bili
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thx for the help
 
Prashant Jain
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Micorsofts JDBC driver for SQL Server 2000 is freely available on their site.(Something is Free at Microsoft :-))The documentation is not very exhaustive but will definitely guide you through to configuring the connection.Here is a sample code,

public String driverName = "com.microsoft.jdbc.sqlserver.SQLServerDriver";

public String connectionString ="jdbc:microsoft:sqlserver://<<servername>>"+
";User=,,username>>"+";Password=<<password>>"+";SelectMethod=cursor";
Class.forName(driverName);
final Connection conn = DriverManager.getConnection(connectionString1);

Hope it helps!

Happpy Programming!
Prashant Jain
prashantjainn@yahoo.com
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic