Can't connect to MSSQL

I've been using MSSQL with java servlet programming. It seems like the connection to MSSQL is not working. Here are the codes.
package coreservlets;
import java.*;
import java.io.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class RunMssql extends HttpServlet {
     Connection connection = null;
public String username = "libsys";
public String password = "123456";
public String url = "jdbc:microsoft:sqlserver://localhost:1433;databaseName=libsys;selectMethod=cursor;";
     public void init()
          try
               Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
               //loading a driver
     connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433;databaseName=libsys;selectMethod=cursor;","libsys","123456");
               //connecting to a database
          catch (Exception a)
               a.printStackTrace();
     public void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException
          doProcess(request,response);
public void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException
     doProcess(request,response);
     public void doProcess(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException
          try{
          init();
DatabaseMetaData dm = null;
          ResultSet rs = null;
          response.setContentType("text/html");
          PrintWriter out = response.getWriter();
          out.println("<HTML>");
          out.println("<BODY>");
          out.println(connection);
          if (connection != null) {
               out.println("<BR>Connected Successfully");
          out.println("</BODY>");
          out.println("</HTML>");
          catch (Exception e)
               System.err.println(e);
Please help to rectify it. Thanks.
Message was edited by:
wesleygch

I show you my program again.
package coreservlets;
import java.*;
import java.io.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class Connect extends HttpServlet{
private Connection con = null;
private final String url = "jdbc:microsoft:sqlserver://";
private final String serverName= "localhost";
private final String portNumber = "1433";
private final String databaseName= "libsys";
private final String userName = "libsys";
private final String password = "123456";
// Informs the driver to use server a side-cursor,
// which permits more than one active statement
// on a connection.
private final String selectMethod = "cursor";
// Constructor
public Connect(){}
private String getConnectionUrl(){
return url+serverName+":"+portNumber+";databaseName="+databaseName+";selectMethod="+selectMethod+";";
private Connection getConnection(){
try{
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
con = DriverManager.getConnection(getConnectionUrl(),userName,password);
}catch(Exception e){
e.printStackTrace();
System.out.println("Error Trace in getConnection() : " + e.getMessage());
return con;
Display the driver properties, database details
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException
               getConnection();
doPost(request,response);
     public void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException
                    response.setContentType("text/html");
                    PrintWriter out = response.getWriter();
          DatabaseMetaData dm = null;
          ResultSet rs = null;
          try{
          con= this.getConnection();
          if(!con.isClosed()){
                                   out.println("Get Connected");
          dm = con.getMetaData();
          out.println(con);
          out.println("Driver Information");
          out.println("\tDriver Name: "+ dm.getDriverName());
          out.println("\tDriver Version: "+ dm.getDriverVersion ());
          out.println("\nDatabase Information ");
          out.println("\tDatabase Name: "+ dm.getDatabaseProductName());
          out.println("\tDatabase Version: "+ dm.getDatabaseProductVersion());
          out.println("Avalilable Catalogs ");
          rs = dm.getCatalogs();
          while(rs.next()){
          out.println("\tcatalog: "+ rs.getString(1));
          rs.close();
          rs = null;
          closeConnection();
          }else System.out.println("Error: No active Connection");
          }catch(Exception e){
          e.printStackTrace();
dm=null;
private void closeConnection(){
try{
if(con!=null)
con.close();
con=null;
}catch(Exception e){
e.printStackTrace();
after I run it in the browser. It shows nothing. Anywhere can help to improve this to make it connected.
Message was edited by:
wesleygch

Similar Messages

  • Can't connect to MSSQL database

    Hi,
    I'm very new to J2EE. I've been trying to get my JSPs to access my MSSQL database. I'm using JBoss as the application server.
    Here's what I've done:
    1. Downloaded and installed the MSSQL 2000 JDBC driver.
    2. Edited the \server\default\deploy\mssql-ds.xml file:
    <datasources>
    <local-tx-datasource>
    <jndi-name>MSSQLDS</jndi-name>
    <connection-url>jdbc:microsoft:sqlserver://server1:1433;DatabaseName=Test;User=sa;Password=passwd;SelectMethod=Cursor</connection-url>
    <driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
    <DatabaseName>Test</DatabaseName>
    <user-name>sa</user-name>
    <password>passwd</password>
    <min-pool-size>100</min-pool-size>
    <max-pool-size>1000</max-pool-size>
    <blocking-timeout-millis>5000</blocking-timeout-millis>
    </local-tx-datasource>
    </datasources>
    3. I edited the "C:\jboss\bin\run.bat" file and inserted into the second line:
    "set CLASSPATH=c:\mssql_jdbc_driver\lib\mbase.jar;c:\mssql_jdbc_driver\lib\msutil.jar;c:\mssql_jdbc_driver\lib\mssqlserver.jar;"
    where C:\mssql_jdbc_driver is the folder where my *.jar files are located.
    4. I created a .jsp page like this:
    -----Start test.jsp -----------
    <%
    try {
    String sDBDriver = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
    String sConnStr = "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=multiplex;User=sa;Password=secret;";
    Class.forName(sDBDriver);
    java.sql.Connection conn = java.sql.DriverManager.getConnection(sConnStr);
    java.sql.Statement stmt = conn.createStatement();
    java.sql.ResultSet rs = stmt.executeQuery("select 'Multiplex' As Name");
    while (rs.next()) { %>
    <%= rs.getString("Name") %><br>
    <%}
    catch (ClassNotFoundException cnfe)
    System.err.println("Unable to load MSSQL database driver!");
    System.err.println("ClassNotFoundException: " + cnfe.getMessage());
    %>
    ------End test.jsp -----------------------
    5. But then when I run test.jsp, I get a ClassNotFoundException saying its not able to load the MSSQL driver.
    Have I missed out some configuration step? I've been searching all avenues of support for 3 days but still can't get it working. Can someone help, please?
    Thanks!

    Thanks for your replies.
    The database should be "Test", sorry.
    I find the JBoss documentation isn't very beginner-friendly. And I can't get a reply from the JBoss forums. Does anyone who has worked with JBoss know where I should define the CLASSPATH for the MSSQL jar files?
    Actually if someone could point me to step-by-step instructions on how to set up a database connection to MSSQL from JBoss in a Windows environment, I would be very very grateful...

  • Can't connect to MSSQL-server via SQL Server Management Studio. Noone else can utilize the server either

    Suddenly the mSSQL-server has stopped working, and the application doesn't have any connection to it.
    Also, I cant connect locally via SQL Server Management Studio.
    Any ideas on where to start?
    Have SQL Server 2008 R2

    Try DAC first:
    http://technet.microsoft.com/en-us/library/ms178068(v=sql.105).aspx
    If that fails, go to Configuration Manager and restart the server.
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • Can't connect to MSSQL server from Linux

    I'm running CentOS 7. I installed the Microsoft ODBC Driver 11 for SQL Server on Linux. I also installed the unixODBC package and dependencies. I can ping the SQL Server. I can telnet to the SQL server on port 1433. My config files read:
    /etc/odbcinst.ini
    [ODBC Driver 11 for SQL Server]
    Description=Microsoft ODBC Driver 11 for SQL Server
    Driver=/opt/microsoft/msodbcsql/lib64/libsmodbcsql-11-0.so.2270.0
    Threading=1
    UsageCount=1
    /etc/odbc.ini
    [baew-cms01]
    Driver="ODBC Driver 11 for SQL Server"
    Server=tcp:172.21.24.29,1433
    Database=smnswr_certmgmt
    ~/.odbc.ini
    [MSSQLTest]
    Driver=ODBC Driver 11 for SQL Server
    Server=tcp:baew-cms01,1433
    [baew-cms01]
    Driver="ODBC Driver 11 for SQL Server"
    Server=tcp:172.21.24.29,1433
    Database=smnsvr_certmgmt
    When I run "sqlcmd -U <user> -S baew-cms01,1433" (substituting user name) I get a password prompt, then I get:
    1>
    So I assume I'm connected, but I'm not sure. However, when I run "isql -v baew-cms01 <user> <password>" again substituting user and password, I get:
    [IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified
    [ISQL]ERROR: Could not SQLConnect
    Can anyone help me determine why I can't isql to the server?
    Thanks,
    Jack

    I get a password prompt, then I get:
    1>
    So I assume I'm connected, but I'm not sure. However, when I run "isql -v baew-cms01 <user> <password>" again substituting user and password, I get:
    Hello Jack,
    Yes, when you get such a "1>" prompt, then you are connected to SQL Server.
    Please note, isql is deprecated, better use SqlCmd. But if you want to use iSql, then you have to use the -S Parameter for the Server Name, not -v. See isql Utility for all
    Parameters.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Can't connect to MSSQL using jdbc type 4

    My settings in the server are the followings:
    Data source class name : com.microsoft.jdbc.sqlserver.SQLServerDriver
    Resource Type: javax.sql.DataSource
    And in the properties, i have added
    DatabaseName: jdbc:microsoft:sqlserver://SQL_SERVER:1433;DatabaseName=Borrar
    Because i have downloaded the jdbc driver type 4 sp3 from microsoft site, in the AppSrv-->JVM Settings --> Path Settings -->Classpath Suffix I have the following:
    C:/Sun/AppServer/pointbase/lib/pbclient.jar
    C:/Sun/AppServer/pointbase/lib/pbembedded.jar
    C:/Sun/AppServer/domains/domain1/lib/classes/msbase.jar
    C:/Sun/AppServer/domains/domain1/lib/classes/msutil.jar
    C:/Sun/AppServer/domains/domain1/lib/classes/mssqlserver.jar
    Using this configuration, when i press the button "Ping" when i'm configurating the connection pool, i have this message:
    " An error has occurred.
    Operation 'pingConnectionPool' failed in 'resources' Config Mbean. "
    Anyone can help me ??

    Since nobody posted the solution and I happened to found one, I want to contribute with the following information. Hope this helps:
    In order to create a connection pool for MSSQLServer
    you have to:
    1. Copy these files to the lib carpet inside domains/domain/DOMAIN_NAME/:
    mssqlserver.jar,
    msutil.jar,
    msbase.jar.
    You can find them in www.microsoft as a single package. Just look for JDBC Driver.
    2. In the administrator console of the AppServer, go to:
    Application Server -> JVM Settings -> Path Settings -> Classpath Suffix -> , and right there add the path for the previous files.
    Press 'Save' and restart the server.
    3. Go to JDBC -> Connection Pools -> New...
    Resource Type: javax.sql.DataSource'
    Database vendor: (none) (Dont select anything here).
    Press Next.
    4. In the field for Datasource ClassName, add
    com.microsoft.jdbcx.sqlserver.SQLServerDataSource
    (Here is where I`ve been having problems. I used to put com.microsoft.sqlserver.SQLServerDriver).
    5. The way to find out that the server found de library is through the attributes. You have to see exactly, among others:
    DatabaseName, SelectMethod, Password, User, PortNumber,ServerName.
    If you see: Port. It means the path to the library is wrong.
    6. Inform exactly the previous fields:
    DatabaseName= yourDBName
    SelectMethod=cursor
    Password=yourDBPassword
    User=yourDBUser
    PortNumber=1433
    ServerName=yourServerName
    7. That�s it. Press finish. and then select the connection you just created and hit ping. You shouldnt see the annoying message about some "MBEAN bla bla bla".
    Good luck. Greetings from Costa Rica.

  • Can I connect my application to mssql server

    Can I connect my application to mssql server ?

    nioe wrote:
    Something more specific, my search on Google does not appear something abuot mssql
    Perhaps you could help the process along by being a little more specific. Is this an in-house application. Will it ever leave your local network? Or does it need to run over the internet? Regardless, the best option will likely be some type of REST web service that any client can use.

  • How can i connect to SQL Server 7.0 on Windons Using JDBC

    How can i connect to Microsoft SQL Server 7.0 on a windows enviroment ?
    in sql server 2000 some jar files are required that is
    What you need to do is actually add all three jar files to your class path individually. There are three jar files that come with this driver the msbase.jar, msutil.jar, and mssqlserver.jar. for sqlQ server 2000.
    now the problem is that i cant find these files on my system. firstly where these files will be located. secondly are they will be used to connect to SQL Server 7.0. thirdly if not what is the procedure.
    My next Problem is that I have Websphere Studio Application Developer. in which their is this facility of Database Webpages its like a wizard which makes automatically beans servlets and JSP but before that you need a Driver Name and and Class Name for to Connect to the Database.
    Can you tell what is the specific Driver Path for the Microsoft SQL Server 7.0 . secondly is this the class which is used to connect to SQL server 7.0 "com.microsoft.jdbc.sqlserver.SQLServerDriver" where can i find this one. for SQL server 7.0.
    please provide some guidance in this regard.

    You can search for the JDBC drivers at, http://industry.java.sun.com/products/jdbc/drivers
    All the three jars that you specified are part of MsSQL Server jdbc driver. You need them (in the classpath) to get connected to the database.
    "com.microsoft.jdbc.sqlserver.SQLServerDriver" is the class in mssqlserver.jar. This is the driver class which will be used to get connected to the database.
    You can search in this forum for writting jdbc code (for Sql Server). If you don't find these jars, give me your e-mail id.
    Sudha

  • Not able to get the connection to mssql server thro native sql

    Dear Experts,
               I have created a database connection to mssql server thro DBCO t.code.Am not able to get the connection when i am executing Native SQl for geting connection of mssql server.
    DATA: CON_NAME LIKE DBCON-CON_NAME VALUE 'BIW'.
    EXEC SQL.
      CONNECT TO :con_name AS 'C1'
    ENDEXEC.
    Am always getting sy-subrc = 4. The user name and password i have given in dbcon table having full authorization to access mssql database. I am working SAP ecc 5.0. Also both servers are running in windows.
    could anyone hlep me on this issue.
    Thanks in advance.

    Hello, the submitted error must be analyzed according to the Syntaxis and characteristics of the MSSQL database. See explanation of error.
    http://doc.ddart.net/mssql/sql2000/html/trblsql/tr_reslsyserr_1_1o1i.htm
    Error 156
    Severity Level 15
    Message Text
    Incorrect syntax near the keyword '%.*ls'.
    Explanation
    This error indicates that the syntax of a Transact-SQL statement is incorrect and that the syntax error was detected near the keyword specified in the error message. The most frequent causes for syntax errors are misspellings of Transact-SQL keywords or operators, and specifying the syntax of a Transact-SQL statement in the wrong order.
    One of the more complicated causes for this error may be a compatibility level mismatch for the current database. If the current database has a compatibility level other than 70, Microsoft® SQL Serveru2122 will not recognize any of the keywords that a database with a compatibility level of 70 would recognize.
    Action
    First, check the Transact-SQL statement syntax near the keyword specified in the error message. Because Transact-SQL language syntax can be very complex, SQL Server may incorrectly report the position of the syntax error as later in the Transact-SQL statement than it actually occurred. Second, reexamine the entire Transact-SQL statement that generated the error. Verify the syntax order of the statement.
    Ensure that the database does not have a compatibility level of 65 and has a compatibility level of 70.

  • I can't connect me In Sql Developer

    Mrs,
    I can't connect me in Sql Developer , because it Show me a Error : UnKnown Instance .
    I have a named Instance ( e-xyon-inf-13\sql2005 ) , when a Put the name , it didnt know.
    Is There any configuration that I must do ?
    Because I am able to connect with another instances and ( e-xyon-inf-13\sql2005 ) exists .
    Thank you,
    Andre

    Can u plz make this out...?
    I want to migrate my data in MsSQL to Oracle ...
    Downloaded the SQL Developer, Downloaded the latest patches... however not able to connect to the SQL server with all parameters specified... a red line message displayed "Failure - cannot connect to MS SQL Server on <hostname>" can there b any reason? I am tryng to migrate from MS SQL 2000 to Oracle 10g using Oracle SQL Developer ....
    --- I AM WORKING ON WIN-XP
    --- Host Ip is well configured in Client n/w utility & SAME ENTERED IN THE SQL Developer's Host Name
    --- SQL Developer can create the connection for oracle successfully
    --- I am working on standalone machine i.e my laptop.
    Regards,
    Mani

  • While connecting the MSSQL (2000, 2005) to BI 7 in rsa1 source system getti

    While connecting the MSSQL (2000, 2005) to BI 7 in rsa1 source system getting below error.
    (When calling a function within the database interface, a return value which cannot be processed by the calling function was provided.)
    Please help me to solve these issues.
    Iu2019m able to connect Oracle 10.g as source system and can view the tables and views.
    BI 7
    Windows 64 bit
    Oracle 10 .2
    SAP GUI 7.
    Advance Thanks,
    KARAN
    Edited by: Harish  Karan on Jun 26, 2008 2:51 PM

    Hello All,
    I found the solution for my particular situation!
    When checking the runtime object for CLU4, an inconsistency in the runtime object popped up:
    - the ABAP dictionary contains the field K5N1
    - the DB dictionry contains the field name K5N01
    This is a known and documented inconsistency, see note 902817 for the description.
    BUT: the solution pointed out there is wrong! The note suggests to delete all content from the physical tables and then activate the table in SE14. This is not possible for cluster tables neither in SE14 nor in SE11.
    This solution worked for me for both CLU4 and VER_CLUSTR:
    - as the tables should be empty normally I dropped them in the database
    - unlock the shadow instance with SAPup
    - log on on to the shadow instance
    - I then made some arbitrary change to the table definition in SE 11 (like adding a field). Make sure to maintain the size class also, otherwise the table won't be activated
    - save the changes and activate the tables
    - take back the previous change
    - save and activate again
    - lock the shadow instance
    - restart the upgrade phase
    Once the upgrade is done, check whether the physical table exists in the DB.
    Hope this helps!
    Regards,
    Matthias.
    Edited by: Matthias Dörfel on Nov 18, 2011 3:14 PM

  • Jdbc connectivity for mssql 2008 in ipv6

    trying to connect to mssql server 2008 in a machine enabled for ipv6 using the following code :
    Connection c = null; String url = "jdbc:sqlserver://;servername=fe80::21a:4bff:fecf:dfe5%4;port=1433;DatabaseName=mssql;selectMethod=cursor;"; String userid = "xxx"; String password = "xxx"; Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); try { c = DriverManager.getConnection(url, userid, password); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); }
    but getting the error:
    com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host  has failed. java.net.NoRouteToHostException: No route to host: connect at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(DriverManager.java:582) at java.sql.DriverManager.getConnection(DriverManager.java:185) at ConnectDB.main(ConnectDB.java:84)
    what is the problem.can any one please suggest me how to connect to mssql using ipv6..
    Thanks in advance...
    Edited by: 789764353 on Sep 7, 2009 4:20 AM

    I guess you must have seen this. But, just in case.
    [Creating a Valid Connection String Using TCP/IP|http://msdn.microsoft.com/en-us/library/ms191260.aspx]
    Also,
    SQL Server and SQL Server Native Client fully support both Internet Protocol version 4 (IPv4) and Internet Protocol version 6 (IPv6). When Windows is configured with IPv6 SQL Server, components automatically recognize the existence of IPv6. No special SQL Server configuration is necessary.[Connecting Using IPv6|http://msdn.microsoft.com/en-us/library/ms345359.aspx]

  • DB connect error  (MSSQL connectivity with SAP BI)- Urgent

    Hi all,
    I am trying to connect the MSSQL 2005 Database to the SAP BI system through RAC.During the creation of the source System(DB Connect) it placed an error as
    DIA RSA1 BY G No shared library found for the database with ID SALMSSQL.
    Can someone please let me know how we can comeup with this issue?Where we can download LIB_DBSL.SAR and the process to load it into theDIR_LIBRARY default path as we are using RAC connectivity.This is very important.Please suggest me
    During the process of creation DB connect source system for MSS what we need to fill for the Connection Info option i.e System IP or the IP of Database and which Databasetable
    DB Connection MSSQL
    DBMS MSS
    User Name sa
    DB password /
    Conn. info MSSQL_SERVER= ? MSSQL_DBNAME= ?
    Connection Limit
    Optimum Conns
    Will reward points.
    Thanks
    D

    Hello Dash,
    Follow the below mentioned steps to create a dbconnect source system.
    1. Goto RSA1 -> Source systems. Right click and Create
    2. Give some name and description and hit enter
    3. a. Con Name : Any name (SQLSRV, etc)
    b. DBMS : MSS
    c. UserName : Any username which is present in the SQL Server. Eg: SA.
    If you have to use Windows Authentication, there is a seperate method :
    For windows authentication, you will have to add your Admin login of BI Server to the SQL Server Security logins group (For Eg: If BI Server name is BID and the admin login for this server is BIDADM, you need to add BIDADM to Logins/Users group of SQL Server and also for the specific database).
    d. Password : Anything.
    e. Con Env : MSSQL_SERVER=<sql server name> MSSQL_DBNAME=<database name> OBJECT_SOURCE= DBO.
    For Example:
    MSSQL_SERVER=ps14apollo MSSQL_DBNAME=PROJECTSERVER_REPORTING OBJECT_SOURCE=DBO
    Here ps14apollo is my SQL Server name. Similarly ProjectServer_Reporting is my database name. DBO should be the Object_Source for most of the SQL Server dbs. I think it should work in your case as well.
    f. DB RECO = select or let it remain unselected.
    g & h Max Connections & OPT Connections = 0, for unlimited connections.
    Regards,
    F-S

  • Make an app that connect to MSSQL server by single sign on

    A straightforward task. I want to create an GUI app that can connect to MSSQL 2014 express when user run it.
    Lets say a domain user name "peterpan" was grant modify right of certain database in SQL server.
    After user login Win7, then run the app. It auto log on to the SQL server and show a list of database for choose to modify.
    The problem is i cant find any info about single sign on vc++ code/library for reference.
    The app is plan to written by vc++ with MFC, ATL. Are these libraries has the method to do want i want?

    >Could you elaborate?
    Sure.  Here's the high level of 20 years of history of Microsoft data access APIs :)
    First there was ODBC, which is still the most widely-used and adopted API for data access from unmanaged code.
    Then various COM (Component Object Model) wrappers and new libraries were introduced, including ADO, DAO, and RDO which were all higher-level wrappers meant to simplify data access.  And OleDB was introduced which is a COM low-level data access API,
    similar to ODBC. 
    When .NET was introduced in 2003, it came with a new data access API, called ADO.NET which is the preferred API for .NET (or "managed") code.  The ADO.NET Provider for SQL Server (System.Data.SqlClient) is not based on ODBC or ADO.  It's
    a ground-up managed client for SQL Server.
    Later the OleDB provider for SQL Server was
    deprecated, and a new SQL Server ODBC Driver was released.  Leaving ODBC as the preferred API for unmanaged C++ development.
    See also Data Access Technologies Road Map, which is a few years old, but explains what lots of the older data access technologies were.
    David
    David http://blogs.msdn.com/b/dbrowne/

  • How can I connect NetBeans 6.1 with SQL Server 2005?

    Hello guys...
    how can i connect NetBeans 6.1 with SQL Server 2005?
    there is no SQL Server in Server list when we create a new Web Project and choose Server.
    I'm new to NetBeans and this is my first time of posting.
    If has some errors and unwanted disturbing,pls understand me. Thanks.
    (If you have references or some snippets, i'll be glad if u can share.)
    scsfdev

    The JDBC-ODBC bridge wasn't recognizing any of the primary keys I had set up in SQL Server. After lots of head banging, here's the solution I came up with:
    1. Download the appropriate driver. SQL Server 2000 requires the SQL Server 2000 JDBC driver (http://www.microsoft.com/downloads/details.aspx?FamilyId=07287B11-0502-461A-B138-2AA54BFDC03A&displaylang=en).
    SQL Server 2005 download: (http://www.microsoft.com/downloads/details.aspx?familyid=C47053EB-3B64-4794-950D-81E1EC91C1BA&displaylang=en)
    3. After installing, right-click on "Libraries" in your project, and choose "Add Library...". Next, give it a name (i.e. SQLServer2000), and select "Class Libraries".
    4. On the next screen, find the JAR files (should be in C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib\), and add them under the "Classpath" tab. It will now be available under "Libraries" for future projects.
    5. You can now create a connection to a specific database under the "Services" tab (next to "Projects" and "Files" in the top left of the screen). Select "Microsoft Sql Server 2000 (Microsoft Driver)" and format the "Database URL" like this:
    jdbc:microsoft:sqlserver//YOURSERVER:1433;DatabaseName=YOURDATABASE
    1433 is the default port, though your DBA may have changed it.
    I posted a simpler version of this on the NetBeans.org FAQ page - they had the following title with no content on the answer page:
    "Cannot Select Tables From MsSql 2000 Because It Says No Primary Key Next To Each Table But The Tables DO Have A Primary Key. What Do I Do?"

  • How can I connect my 3gen apple tv with HDMI to my bush LCD32TV022HD which does not have an HDMI port but does have 1)S-Video I/P, 2)Video I/P, 3) L

    How can I connect my 3gen apple tv with HDMI to my BUSH LCD32TV022HD
    This does not have an HDMI port but does have:-
    1) S-Video I/P,
    2) Video I/P,
    3) Audio Input (Left & Right)
    4) Audio In jack (for VGA and DVI source)
    5) DVI input
    6) VGA input

    Welcome to the Apple community.
    The Apple TV doesn't officially support a DVI connection, however you may be able to get it to work. You will first need to check that your TV supports either 720p or 1080p as well as HDCP. If you are able to get the video working over the DVI connection, you may also require a DAC in order to connect with Apple TV's optical audio output to the TVs audio imput.
    You may well wish to make sure that the DVI connection works before spending any money on a DAC..

Maybe you are looking for

  • Sounds NOT working! Please help!

    I have a ON/OFF switch to sound the music. When the site loads the music plays automatically and if clicked it turns off the music and it works OK, but if I imported a new music file with a different file name and delete the one that worked. I set th

  • BAPI not working in Java Webdynpro

    Hi, My BAPI from SAP is working in Netweaver perfectly, but when I call the same with the equal parameters in Java webdynpro, no results. I'm using following function: 'CVAPI_DOC_VIEW'. Any idea why the BAPI is not working in Java Webdynpro? Regards,

  • How can I put photos in the layers palette so I can put one over the other.

    How can I take 3 photos that are in the project bin and place them in levels so that I can use portions of each photo, and layer them?

  • Help with import/drag one photo into iPod Classic 160

    Hello - I could swear I've done this before --- I've got my iPod Classic 160 Gb synced to iTunes, and JUST want to drag one little photo onto my iPod (in the left column), but I get an alert & it won't let me do this. Can't you just add a photo by dr

  • My ipad is locked with an apple and line under it

    My ipad is locked.  Shows an apple with a line under the apple.  Won't turn on or off.