I want to use jdbc to connect MS SQL SERVER

hi,
I want to use jdbc to connect MS SQL SERVER,not the jdbc-odbc bridge.
I download the driver from MS,deploy it,but when I connect the database such as:
<%Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");%>
<%String sConnStr="jdbc:microsoft:sqlserver://computer2000:1433";%>
<%Connection conn=DriverManager.getConnection(sConnStr,"sa","123");%>
<%Statement stmt=conn.createStatement();%>
but it said
javax.servlet.ServletException: com.microsoft.jdbc.sqlserver.SQLServerDriver
java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
how can i work out this problem
maybe my configure is wrong,please give me a successful sample configuration
thanks a lot

Hi,
I am not sure where you have got the following code from
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
What happens here, is Java Runtime will search for the Class named:
com.microsoft.jdbc.sqlserver.SQLServerDriver
If this Class is not in the Runtime Classpath, it will throw the Error that you have got. Kindly get the proper driver as well as ensure that the Class is available in the Runtime Classpath.
Thanks and regards,
Pazhanikanthan. P

Similar Messages

  • Help me! can not using JDBC driver for MS SQL server

    I can test sucess in connection, but create EJB when have follow error.
    04/05/19 12:23:04 SQL error: No suitable driver
    04/05/19 12:23:10 Error creating table: No suitable driver
    500 Internal Server Error
    java.lang.NoClassDefFoundError: oracle/jbo/html/HtmlServices
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:182)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:600)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)

    HI All,
    I am using JDBC driver to pull data from MS SQL Server
    2000 for my application Liaison Content Exchange, and
    which only accepts JDBC drivers to talk to databases.
    I dowloaded the driver from Microsoft website, and had
    a successful installation.What do you call "a successful installation"? Where was the JAR file places?
    But the application ask me for Driver Name, Class, URL, Time out and Data Source.What application do you mean? Liaison Content Exchange? I'm not familiar with that product.
    By default no driver is available in the drop down combo box. After using
    "com.microsoft.jdbcx.sqlserver.SQLServerDataSource" as
    class and
    jdbc:microsoft:sqlserver://192.168.17.2:1433; as url,
    the application throw me a error which states "Unable
    to instantiate an instance of the application driver"Sounds like it could be one of several things:
    (1) The JDBC JAR is not in the CLASSPATH where Liaison Content Exchange expects to find it.
    (2) You need to do something else to tell Liaison Content Exchange more information to define the data source.
    (3) The URL might be incorrect. Only you can know if the IP address of the host is correct. You don't supply a database name - perhaps you should. Are you sure that 1433 is the correct port number? I know that's true for SQL Server 7.0, but I remember that the default was changed to something else for SQL Server 2000. Ask your database admin what port this listener is assigned to for SQL Server 2000.
    (4) You might want to append ";selectmethod=cursor" to the end of your URL. (See the docs for this.)
    (5) Make sure you can connect to the database with something other than Java (e.g., the M$ SQL Server client).
    . I am not able to trouble shoot this problem, any one
    pls help me ASAP at [email protected]
    Thx.Bad idea to post an e-mail address. You're not supposed to communicate outside the forum. it's against the guidelines for using the forum.

  • Use Database link connect to SQL Server

    I have a database link from Oracle to SQL Server using user cdit and this user connects to database "northwind".How can i get data from another database use this database link?

    Just add the @<<db link name>> to the table name in your SELECT
    SELECT *
      FROM <<table name>>@<<db link name>>Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Address book application in java using jdbc to connect to mySQL server

    hi there .....
    as clear from the topic i want to make an address book.....as above
    this is my first ever proper application of java
    i have this plan
    class GUI{* contains all components */}
    class links_GUI_to_db{* contains business logic simple enough from name */}
    then i make objects of both classes in "Main" class and all processes are done there
    as i am totally new to this thing , i would like some advice and an initial guideline on how to proceed
    i am NOT ASKING for code but advice on interaction of classes and how to proceed intitially
    thanks

    Hi,
    The answer depends pretty much on how ambitious you are, and several articels and books can be written on the topic, so it's unfortunately not something that can be fully answered in a short post.
    My best advice is that you google on MVC and on how to create layered applications. You can after that start reading e.g. JDBC tutorials and Swing tutorials (if that is the UI that you are going to use).
    Kaj
    Ps. I would probably not use MySQL as database for an address book. I would instead use a database that doesn't require installation. E.g. H2 or Derby.

  • MARS connection to SQL Server in JAVA via ODBC

    Hello.
    I've got this problem.
    I'm managing an application JAVA/JSP, based on a 3-tier architecture.
    The connection to the database is performed via JDBC/ODBC, in order to work with different DRMS.
    Everything is ok when connecting to Oracle or MySql via JDBC, but when we connect to SQL Server via ODBC we get this error: "ODBC SQL SERVER - Connection is busy with result for another stmt".
    That's why the application executes more than one SQL statement, opening a ResultSet object, under the same connection.
    This is the way the application is performing, and we can't change it.
    I've read that on SQL Server 2005 is available a new connection parameter called MARS (Multiple Active Result Sets), that should resolve this problem.
    But I was not able to find any way to invoke this type of connection in JAVA for an ODBC connection! (I've found only tips for .NET...).
    Many thanks if somebody can suggest me how to resolve this problem.
    It's urgent!

    Use JDBC. Get a SQL server JDBC driver. Unfortunately I don't know of any free ones, but one I have used in the past is from http://www.jnetdirect.com/
    Maybe you can search in the JDBC forum for the answer - Its a common enough question I know.

  • Using integrated security to access SQL Server database

    Hi,
    Currently we are using username/password combination to log in to a SQL Server database. These varaiables are defined as environment variables.
    For security reasons we now want to use integrated security of the SQL Server database. This way the connection will be with the NTUser the Nodemanager has been started with.
    Can this be done in Fort�?

    I do not think there is a way to pass the NT user's security authentication over to the DB in UDS.
    ka

  • How to create a DSN-less connection to SQL Server for linked tables in Access

    hey
    i cant understand how i use that Function
    if that information what you need
     stLocalTableName: dbo_user_name
    stRemoteTableName: user_name
    stServer :sedo2015.mssql.somee.com
    stDatabase :sedo2015
    stUsername :sedo_menf_SQLLogin_1
    stPassword :123456789
    how will be that Function??
    please write that Function to me
    '//Name : AttachDSNLessTable
    '//Purpose : Create a linked table to SQL Server without using a DSN
    '//Parameters
    '// stLocalTableName: Name of the table that you are creating in the current database
    '// stRemoteTableName: Name of the table that you are linking to on the SQL Server database
    '// stServer: Name of the SQL Server that you are linking to
    '// stDatabase: Name of the SQL Server database that you are linking to
    '// stUsername: Name of the SQL Server user who can connect to SQL Server, leave blank to use a Trusted Connection
    '// stPassword: SQL Server user password
    Function AttachDSNLessTable(stLocalTableName As String, stRemoteTableName As String, stServer As String, stDatabase As String, Optional stUsername As String, Optional stPassword As String)
    On Error GoTo AttachDSNLessTable_Err
    Dim td As TableDef
    Dim stConnect As String
    For Each td In CurrentDb.TableDefs
    If td.Name = stLocalTableName Then
    CurrentDb.TableDefs.Delete stLocalTableName
    End If
    Next
    If Len(stUsername) = 0 Then
    '//Use trusted authentication if stUsername is not supplied.
    stConnect = "ODBC;DRIVER=SQL Server;SERVER=" & stServer & ";DATABASE=" & stDatabase & ";Trusted_Connection=Yes"
    Else
    '//WARNING: This will save the username and the password with the linked table information.
    stConnect = "ODBC;DRIVER=SQL Server;SERVER=" & stServer & ";DATABASE=" & stDatabase & ";UID=" & stUsername & ";PWD=" & stPassword
    End If
    Set td = CurrentDb.CreateTableDef(stLocalTableName, dbAttachSavePWD, stRemoteTableName, stConnect)
    CurrentDb.TableDefs.Append td
    AttachDSNLessTable = True
    Exit Function
    AttachDSNLessTable_Err:
    AttachDSNLessTable = False
    MsgBox "AttachDSNLessTable encountered an unexpected error: " & Err.Description
    End Function

    thanks more thanks for you
    look i add that code in form
    it worked but i cant add recored  why ??
    Private Sub Form_Open(Cancel As Integer)
    Call AttachDSNLessTable("dbo_user_name", "user_name", "sedo2015.mssql.somee.com", "sedo2015", "sedo_menf_SQLLogin_1", "123456789")
    End Sub

  • How to use JDBC database connection in Solaris

    Hi all,
    I am new to Solaris and i want to create an application using JDBC database connection.
    I want a small piece of code, probably a login page code that verifies the username from a OpenOffice database (.odb) file. I am particular to know the driver name, etc. If possible give the code using JNDI loopkup.
    Thanks in advance,
    Parasou.

    Sure no problem.
    Please stand by while I do your work for you.

  • Using INET and DATADIRECT JDBC Drivers to connect MS SQL Server 2005

    Hi,
    I have reqmt to connect SQL server 2005 from ODI using INET and DATADIRECT JDBC drivers to test Local characters Encoding.
    In my case, Oracle is the Source and SQL Server 2005 is the Target. I have problem while interfacing Local Characters to SQL Server 2005 using com.microsoft.sqlserver.jdbc.SQLServerDriver driver( which is default driver provided by ODI). To fix local charatcters issue, I want to try using INET or DATADIRECT JDBC drivers. Please provide me the below of any one has used these Drivers to connect SQL Server 2005 from ODI.
    We are trying to connect to MS SQL Server 2005 from ODI Topology Mgr using INET and DATADIRECT JDBC Drivers. We need the following info to connect to the same,
    --> What are list of the drivers need to be placed in OraHome_1\oracledi\drivers path?
    --> Where can i get the latest driver versions.
    --> What are the JDBC DRIVER and URL formats.
    --> Any other additional configurations?
    --> Does these drivers support interfacing of Local character data.
    Please respond...
    Regards,
    Anil

    Check this article [HOW TO: SQL & JAVA|http://www.shahriarnk.com/Shahriar-N-K-Research-Embedding-SQL-in-C-Sharp-Java.html] for details on how to connect to SQL Server database from C#.NET database applications as well as Java database applications. It also describes how to pass embedded SQL queries (SELECT, INSERT, UPDATE, DELETE), calling stored procedures, pass parameters etc.

  • 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

  • I want to use the Thunderbolt connection for an external hard drive

    I want to use the Thunderbolt connection for an external hard drive - so what port would I use on the MacBook Pro 13" for the display monitor.  Thank you!

    This is not the forum for MacBook Pro owners.
    You just need to reformat the drive in Disk Utility and erase the drive and have  Mac HFS.
    If you did need to use NTFS then you would not want -3G but Paragon NTFS for OS X x. 10.0
    Or buy something that isn't pre-formatted to Windows NT file system.
    First though make sure you have backups of your system. TimeMachine being used now?
    http://macperformanceguide.com/Mac-TimeMachine-drive.html
    http://www.apple.com/support/timemachine/
    Maybe cleanout some files you don't need.
    Install a larger notebook hard drive even.
    http://www.macsales.com/firewire has a lot of choice in Mac compatible drives and enclosures so you don't need to worry about Fantom not working at some point.
    https://discussions.apple.com/community/notebooks/macbook_pro
    https://discussions.apple.com/community/mac_os/mac_os_x_v10.6_snow_leopard

  • Problem connecting to SQL Server from JDeveloper 10g using jdbc third party

    I am using Oracle 10g Jdeveloper and I tried to setup a database
    connection to SQL Server using various Drivers for JDBC as Merlin, jtds, inet.tds, etc.
    (I had no problem to set up a connection to an Oracle Database using the
    Oracle JDBC driver).
    When I am testing the connection throughout the wizard, I do receive
    this error message: "Unable to find driver:
    com.microsoft.jdbc.sqlserver.SQLServerDriver".
    I m not understanding from last 3 days where to place the corresponding JAR files so thaI may not get the Error.
    When I hit n trialed at various directories of the JDeveloper as </rootDir/jdbc/lib>
    </rootDir/lib>
    </root/jdev/my Work/Application1/Project1/public_html>
    </root/jdev/my Work/Application1/Project1/public_html/web-inf/>
    when I tested the connection I do received:
    "Unable to find driver:
    xxx.xxx.xxx.xxxxxxx Unable to find driver:
    Obviously it can't locate the Micrososft JDBC driver but I can't
    figure out why.
    I tried all kind of things without any success. Is somebody can help
    me and took me beyond this.
    I m trying to build DataSource connection from JavaBeans.
    Please make me out of this cave. I m not finding any of the way to do this.
    The last code I tried is
    try {
    Class.forName("com.inet.pool.PoolDriver");
    com.inet.tds.TdsDataSource tds = new com.inet.tds.TdsDataSource();
    tds.setServerName( "local" );
    tds.setDatabaseName( "bluff" );
    tds.setUser( dbUserName );
    tds.setPassword( dbPassword );
    DataSource ds = tds;
    Connection con = ds.getConnection(dbUserName,dbPassword);
    Statement stmt;
    ResultSet rs = null;
    Thanks,

    you are confusing me at least as your error is discussing the microsoft driver yet you are configuring the inet datasource.
    I do not use JDeveloper, but you need to make sure that whatever is servicing your web app/JavaBean has access to the driver. Not sure why you are not doing a JNDI look up of the resoure, but because you are not you can stick the driver jar in the lib directory within the WAR bundle. I would suggest that you add the driver to the lib/ext or the lib directory which is loaded at boot time for your web container and then use JNDI to look up your DataSource to reduce your coding maintenance headaches.

  • I want to use Golden Gate to connect MS SQL Server 2005 with Oracle 10g dat

    I want to use Golden Gate to connect MS SQL Server 2005 with Oracle 10g database. So, i have installed both databases on different pc's on windows platform. MS SQL Server 2005 on windows XP and Oracle 10g on windows 2003.
    I have configure Golden Gate step by step by following oracle guideline:
    http://www.oracle.com/technetwork/articles/datawarehouse/oracle-sqlserver-goldengate-460262.html
    When i run following command on target (oracle 10g):
    replicat paramfile dirprm/inload.prm
    I encounterd following error:
    2012-05-21 20:27:06 ERROR OGG-00014 Unrecognized parameter: USERID. Paramete
    r could be misspelled or unsupported.
    2012-05-21 20:27:06 ERROR OGG-01668 PROCESS ABENDING.
    My INLOAD FILE Content are:
    SPECIALRUN
    END RUNTIME
    USERID gg_user, PASSWORD welcome1
    EXTFILE D:\oracle\gg\dirdat\ex
    SOURCEDEFS D:\oracle\gg\dirdef\emp.def
    MAP hrschema.emp, TARGET gg_user.emp;
    Can you plz suggest me that where i am wrong?
    Thanks advance to all experts.

    amardeep.sidhu wrote:
    That should work, just in case try adding DBLOGIN before USERID
    DBLOGIN USERID x..No needed in the param file i think.its not needed at all you are right, but what else could it be? Besides any special unseen character :P

  • I have recently purchaced an ipad 2 16gb wifi and somebody told me if i wanted to use 3g or connect to the internet whaere i cant get and wifi i can connect my iphone to my ipad and use my iphone 3g is this true?

    I have recently purchaced an ipad 2 16gb wifi and somebody told me if i wanted to use 3g or connect to the internet whaere i cant get and wifi i can connect my iphone to my ipad and use my iphone 3g is this true?

    Yes, that is the Tetheringn or HotSpot option.  Some models have this.  You will have to set up your phone to do this, and your carrier will likely charge you an extra fee for the tethering service.

  • How do i connect to sql server using java?

    hi ever body
    i need to connect to sql server using java
    what is the driver i will use?
    thanks

    Microsoft make a jdbc driver and it is readily available through MSDN. Here is a link http://msdn2.microsoft.com/en-us/data/aa937724.aspx. Whatever jdbc driver you are looking for, Google it, and if it exists you'll find it in 10 seconds.

Maybe you are looking for

  • URGENT---Automatic payment run-Vendor open item clearing

    When I run the payment program, it ran without any error, however, the vendor account was not cleared. The balance in GL and Vendor account remains the original amounts. And the Vendor line items which were supposed to be cleared thru F110, are now s

  • Sales order item requiring assignment

    Hi SD Gurus I need a sales order without any costing/accounting/profitability context/connection/dependencies whatsoever. I have set up a material type which is not valuated , a sales document type where billing fields are blank and an item catgory w

  • Adding Word attachment to a SOFM object and then to Workflow container

    Hi! I have a Web Dynpro for ABAP application that should send attachments of uploaded files to a workflow container. I have already managed to do this, and it works fine for TXT files, but when I try to attach a WORD (.DOC) file the file looks corrpu

  • Apple TV - 3rd Generation Rev2

    Hello, Does anyone know when Rev2 of Apple TV 3rd Gen going to come out? Thanks

  • Adobe central form filler

    Last even I purchased the central form filler on a monthly payment basis.   I was told by Phillip that I would be able to download and complete Doctor appointment forms.  I have been unable to upload  and complete the forms.  The button for forms wil