Help connecting to sqlserver2000 using JDBC

Hi there..
i'm student and i want to make
connection to sqlserver2000 please if any one can explain the steps because i read some code but it did not work with me
so I want explanation to the steps with sample codes
thank you
yours sincerely,
alaa

http://java.sun.com/docs/books/tutorial/jdbc/
%

Similar Messages

  • Connecting to Oracle using JDBC

    Hi all,
    I am a new to Oracle. I am trying to connect to Oracle using JDBC
    The URL with which I tried to connect was:
    jdbc:oracle:oci8:@myServiceName,user='myLogin',password='myPassword'
    I get an error (ORA-12154)
    - TNS could not resolve service name
    When I use the same userid, password and service and connect thru' SQL*Plus it goes thru'. Is there any parameter which I am missing. Can anyone throw some light on this. I am held up with this issue badly.
    Thanks for all your help and time.
    Regards,
    Latha

    Hi Latha,
    Please try to use thin and add port number.
    m_conn = DriverManager.getConnection("jdbc:oracle:thin:@" + hostURL + ":" + port + ":" + database, user, password);
    Hong
    null

  • Connecting to SQL Using JDBC - Help!

    Hi All
    I am looking to create some conections to various custom SQL DBs so that I can produce reports and queries using visual composer. I have various Stored procedures DTS and tables I need to access.
    I have no idea where to start with this, only that I need to use JDBC. Does anyone have or can point me in the right direction on how to set up these systems in the portal. I have EP7.0 SP8.
    Many thanks for your help and time
    Phil

    Hi Phil,
    you can find a good example on:
    https://www.sdn.sap.com/irj/sdn/visualcomposer?rid=/library/uuid/16244247-0a01-0010-3294-d81c21e7e86e
    With JDBC Systems you can call stores procedures and with BI JDBC Systems you can see the tables and views.
    You can create a standar JDBC using the portal Wizard and the BI JDBC systems with:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/6209b52e-0401-0010-6a9f-d40ec3a09424
    Best Regards.
    Nacho

  • Connect Flat files using jdbc

    Hi,
    I have a problem with connecting flat files(.txt, .xml, .csv, .xls, etc...) which is existing in application it's self, using jdbc connection.
    After searching I found some suggestions below.
    1)xlsql
    2)JDO
    I tried with first one (xlsql), below is the process. First create core java project and load the jar files which is from xlsql. below is the code
    Class.forName("com.nilostep.xlsql.jdbc.xlDriver");
    final String dir = System.getProperty("user.dir")+"\\db\\xl";
    conn = DriverManager.getConnection("jdbc:nilostep:excel:/"+dir);
    Statement stmt = con.createStatement();
    String sql = "select * from Sheet1$";
    ResultSet rs = stmt.executeQuery(sql);
    if(rs.next()){
    System.out.println(rs.getString(1));
    }else{
    System.out.println("nodata....");
    It is saying Sheet1$ table not existing.
    Please help me.

    Not quite sure of your definition of a flat file, but a .xls files is a Microsoft Excel workbook, which is saved in a proprietary binary format, so there's certainly nothing 'flat' about it.  Of course, there are odbc and suchlike drivers for treating Excel workbooks as data sources, but you need to ensure when you query them that you know the details of the workbook.
    In each workbook, each spreadsheet has a name (as defined on it's tab at the bottom).  That is taken to be the name of the 'table' that you use when you query it with SQL.
    On each spreadsheet, row 1 of that sheet should denote the column names of the 'table'
    All subsequent rows on the spreadsheet are the data that will be returned from querying it.
    Typically, the data on the sheets should be fairly straightforward, in order to query it.  Some excel functionality may prevent it being queried properly.

  • Connecting to Oracle using JDBC problem

    When trying to connect using the following few lines:
              String urn = "jdbc:oracle:thin:@localhost:1521:XE";
              Class.forName("oracle.jdbc.driver.OracleDriver");
              Connection _con = DriverManager.getConnection(urn, "user", "pass");
    I get an ArrayIndexOutOfBounds Exception
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 7
         at oracle.security.o3logon.C1.r(C1)
         at oracle.security.o3logon.C1.l(C1)
         at oracle.security.o3logon.C0.e(C0)
         at oracle.security.o3logon.O3LoginClientHelper.getEPasswd(O3LoginClientHelper)
         at oracle.jdbc.ttc7.O3log.<init>(O3log.java:287)
         at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:227)
         at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:198)
         at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:251)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:224)
         at java.sql.DriverManager.getConnection(Unknown Source)
         at java.sql.DriverManager.getConnection(Unknown Source)
    I am using JDK 1.4, and I installed the Oracle Database 10g Express Edition.
    If anyone has used JDBC before, and knows how this should be done...
    thanks

    Hi All,
    Even im facing similar issues, please advise and help. Details as below,
    System and java spec used:
    Windows Edition : Windows Server 2008 R2 Standard
    System type : 64-bit Operating System
    NetBeansIDE version : 6.1
    JDK Version : 1.6
    DB : Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    Connection string: : <root>
    <title>Oracle R12 Prod</title>
    <jdbc-connection-string>jdbc:oracle:thin:<username>/<password>@<host>:<port>:<SID></jdbc-connection-string>
    </root>
    StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
    java.lang.ArrayIndexOutOfBoundsException: 7
    at oracle.security.o3logon.C1.r(C1)
    at oracle.security.o3logon.C1.l(C1)
    at oracle.security.o3logon.C0.c(C0)
    at oracle.security.o3logon.O3LoginClientHelper.getEPasswd(O3LoginClientHelper)
    at oracle.jdbc.ttc7.O3log.<init>(O3log.java:290)
    at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:251)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:252)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
    at java.sql.DriverManager.getConnection(DriverManager.java:582)
    at java.sql.DriverManager.getConnection(DriverManager.java:207)
    at db.dbConnect.makeConnection(dbConnect.java:55)
    at org.apache.jsp.rep.rep1_005fgo_jsp._jspService(rep1_005fgo_jsp.java from :222)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:855)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:660)
    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:578)
    at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:997)
    at org.apache.jsp.rep.rep1_005fgo0_jsp._jspService(rep1_005fgo0_jsp.java from :111)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
    at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)

  • Cannot connect to database using JDBC

    Hello!
    I am trying to connect to my local database using this script:
    import java.sql.*;
    public class test{
    public static void main (String[] args){
      try
        DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
        Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","scott","tiger");
        Statement StmtPersoane = conn.createStatement();
        ResultSet CrsPersoane =StmtPersoane.executeQuery("select p.* from personal p");
        int jMarca = 0;
        while(CrsPersoane.next()){
        jMarca = CrsPersoane.getInt("marca");
        System.out.println(jMarca);
        CrsPersoane.close();
        StmtPersoane.close();
        conn.close();
      catch(SQLException e)
        e.printStackTrace();
    }When compiling i am getting this error: Error(7,58): cannot access class oracle.jdbc.driver.OracleDriver; file oracle\jdbc\driver\OracleDriver.class not found
    I have set a CLASSPATH enviroment variable with value : D:\oracle10g\product\10.1.0\Db_1\jdbc\lib\ojdbc14.jar
    Please provide some hints. Thanks in advace !

    Problem solved with the connection, but now i'm getting another error when i am trying to parse an error. Here is the code a little bit modified:
    import java.sql.*;
    import java.text.*;
    import java.text.ParseException;
    import java.util.*;
    public class test{
    public static void main (String[] args){
      try
        DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
        Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","scott","tiger");
                Statement StmtPersoane;
                StmtPersoane = conn.createStatement();
                ResultSet CrsPersoane =StmtPersoane.executeQuery("select marca from personal");
                int jMarca;
                jMarca = 0;
    java.util.Date dataJava = new java.text.SimpleDateFormat("dd/mm/yyyy").parse("04/10/2006");
    java.sql.Date dataSql = new java.sql.Date(dataJava.getTime());
    System.out.println("Data: "+dataSql);
        System.out.println("Angajatii sunt:"); 
                while(CrsPersoane.next()){
        jMarca = CrsPersoane.getInt("marca");
        System.out.println(jMarca);
        CrsPersoane.close();
        StmtPersoane.close();
        conn.close();
      catch(SQLException e)
        e.printStackTrace();
    }The error:
    Error(24,81): unreported exception: java.text.ParseException; must be caught or declared to be thrown
    Any ideas ?

  • Connection to Excel using JDBC

    Hi
    I developed a program to send userid to excel sheet using jdbc...
    While i opened excel sheet and try to send data through jdbc it works great ...
    But the problem is while i closed the excel sheet and try to send data to excel sheet, it spells success.
    But the data i entered is not in that excel sheet ...
    What to do .???
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.*;
    public class InsertExcel
    static JFrame frame;
    static JPanel panel;
    static JTextField textuserid;
    static JTextField textfirstname;
    static JTextField textlastname;
    static JButton submit;
    static JButton exit;
    public static void main(String args[])
    frame = new JFrame("Inserting to excel sheet");;
    panel = new JPanel();
    JLabel labeluserid = new JLabel("User id ");
    JLabel labelfirstname = new JLabel("First Name");
    JLabel labellastname = new JLabel("Last Name");
    textuserid = new JTextField(20);
    textfirstname = new JTextField(20);
    textlastname = new JTextField(20);
    submit = new JButton("Submit to Excel sheet");
    exit = new JButton("Exit");
    panel.add(labeluserid);
    panel.add(textuserid);
    panel.add(labelfirstname);
    panel.add(textfirstname);
    panel.add(labellastname);
    panel.add(textlastname);
    panel.add(submit);
    panel.add(exit);
    frame.getContentPane().add(panel);
    frame.setSize(1024,100);
    frame.setVisible(true);
    frame.setDefaultCloseOperation(3);
    submit.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
         try
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              Connection con = DriverManager.getConnection("jdbc:odbc:Excel Files","","");
              PreparedStatement stat2 = con.prepareStatement("insert into
    [Book1$](USERID,FIRST_NAME,LAST_NAME) values (?,?,?)");
              stat2.setString(1,textuserid.getText());
              stat2.setString(2,textfirstname.getText());
              stat2.setString(3,textlastname.getText());
              stat2.executeUpdate();
              JOptionPane.showMessageDialog(frame,new String("Successfully entered to excel sheet !!!"));
         catch(Exception e1)
              JOptionPane.showMessageDialog(frame,new String("Error while inserting to excel sheet !!! \n" +
    e1));
    exit.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent ex)
         System.exit(0);
    }

    I think this thread has been cross-posted

  • Not able to connect to database using jdbc

    Respected sir/madam,
    I am new to java and i am trying to connect to database which is necessary for me in project when i wrote the code using class.forName i am able to compile but when runnig i am getting two exceptionns one is oracle.jdbc.driver.oracledriver not found or excetion in thread main class not found please help me

    Subash,
    1) Please refrain from cross-posting (posting the same message into two or more forums). This question was better asked in the JDBC forum as you eventually put it but you already posted here so if that happens again next time just leave the original thread be.
    2) Your compilation classpath and your runtime classpath are not related. As a matter of fact with well written JDBC code and under most conditions you should not need your driver in your compilation classpath at all, only your runtime one.
    3) Your driver is not in your runtime classpath. That is the error that you need to resolve.

  • Connect Ms-Access using jdbc in local

    I'm having a problem on connecting my java application with my Access database. My Access database and class file is locate in c:\jdbc folder. Below is my code. Anyone know what wrong it is?
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String dbURL = "jdbc:odbc:C:\\jdbc\\students.mdb";
    connection = DriverManager.getConnection(dbURL);

    It's work now... but I want to learn how to configure
    my ODBC driver. Anyone can help or any place website
    that can help me get this resolves?
    sorry for asking this silly question. I'm not only new
    in Java but also RDBMS and my java book never teach
    this things... :(If you are working on windows platform,
    Start-->Settings-->Control Panel-->Data Sources(ODBC)-->User DSN or System DSN-->Add-->Microsoft Access Driver-->Finish
    Now you would have got ODBC Microsoft Access Setup.
    Enter DSN name and select the database, click on advanced and enter username and password. Thats all.
    You can use int in your pgm,
    connection = DriverManager.getConnection(dbURL,username,password);
    Sudha

  • Connecting to Oracle using JDBC issue

    Hi All,
    Im facing similar issues, please advise and help. Details as below,
    System and java spec used:
    Windows Edition : Windows Server 2008 R2 Standard
    System type : 64-bit Operating System
    NetBeansIDE version : 6.1
    JDK Version : 1.6
    DB : Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    Connection string: : <root>
    <title>Oracle R12 Prod</title>
    <jdbc-connection-string>jdbc:oracle:thin:<username>/<password>@<host>:<port>:<SID></jdbc-connection-string>
    </root>
    StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
    java.lang.ArrayIndexOutOfBoundsException: 7
    at oracle.security.o3logon.C1.r(C1)
    at oracle.security.o3logon.C1.l(C1)
    at oracle.security.o3logon.C0.c(C0)
    at oracle.security.o3logon.O3LoginClientHelper.getEPasswd(O3LoginClientHelper)
    at oracle.jdbc.ttc7.O3log.<init>(O3log.java:290)
    at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:251)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:252)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
    at java.sql.DriverManager.getConnection(DriverManager.java:582)
    at java.sql.DriverManager.getConnection(DriverManager.java:207)
    at db.dbConnect.makeConnection(dbConnect.java:55)
    at org.apache.jsp.rep.rep1_005fgo_jsp._jspService(rep1_005fgo_jsp.java from :222)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:855)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:660)
    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:578)
    at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:997)
    at org.apache.jsp.rep.rep1_005fgo0_jsp._jspService(rep1_005fgo0_jsp.java from :111)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
    at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)

    Can someone please help me on the above query

  • 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.

  • Need Help Connect to MySQL using dg4odbc

    I am looking for some help getting a dblink working from my Oracle 11.1.0.6 Dtabase to a MySQL 5.0.77 Database (Holds Bugzilla).
    This is the error I get when I try select * from "bugs"@bugz;
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [MySQL][ODBC 5.1 Driver][mysqld-5.0.77]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"bug_id" FROM "bugs" A1' at line 1
    ORA-02063: preceding 2 lines from BUGZ
    On Server hosting Oracle DB:
    lsb_release -id
    Distributor ID: RedHatEnterpriseServer
    Description: Red Hat Enterprise Linux Server release 5.7 (Tikanga)
    rpm -qa|grep mysql
    mysql-connector-odbc-5.1.8-1.rhel5
    mysql-5.0.77-4.el5_6.6
    tnsping BUGZ
    TNS Ping Utility for Linux: Version 11.1.0.6.0 - Production on 08-DEC-2011 07:53:52
    Copyright (c) 1997, 2007, Oracle. All rights reserved.
    Used parameter files:
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))) (CONNECT_DATA = (SID = BUGZ)) (HS = OK))
    OK (0 msec)
    tnsnames.ora
    BUGZ =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
        (CONNECT_DATA =
          (SID = BUGZ)
        (HS = OK)
      )listener.ora
    SID_LIST_LISTENER =
      (SID_LIST =
         (SID_DESC =
            (ORACLE_HOME = /u00/app/oracle/product/11.1.0/db_1)
            (SID_NAME = BUGZ)
            (PROGRAM = dg4odbc)
            (ENVS ="LD_LIBRARY_PATH=/u00/app/oracle/product/11.1.0/db_1/lib:/usr/lib64:/usr/lib")
    .../u00/app/oracle/product/11.1.0/db_1/hs/admin/initbugz.ora
    # This is a sample agent init file that contains the HS parameters that are
    # needed for the Database Gateway for ODBC
    # HS init parameters
    HS_FDS_CONNECT_INFO=bugz
    HS_FDS_TRACE_LEVEL=off
    HS_FDS_SHAREABLE_NAME=/usr/lib64/libmyodbc5.so
    HS_LANGUAGE=AMERICAN_AMERICA.WE8ISO8859P15
    # ODBC specific environment variables
    set ODBCINI=/u00/home/oracle/.odbc.ini
    # Environment variables required for the non-Oracle system
    set HOME=/u00/home/oracle
    ~/u00/home/oracle/.odbc.ini
    [ODBC Data Sources]
    [bugz]
    Driver      = /usr/lib64/libmyodbc5.so
    DATABASE    = bugzilla
    DESCRIPTION = MySQL ODBC 5.x Connector
    PORT        = 3306
    SERVER      = bugzilla
    UID         = bugquery
    PWD         = password
    CHARSET     = latin1
    TRACEFILE   = /tmp/myodbc-bugzdsn.trc
    TRACE       = OFFODBC Test
    isql -v bugz
    +---------------------------------------+
    | Connected!                            |
    |                                       |
    | sql-statement                         |
    | help [tablename]                      |
    | quit                                  |
    |                                       |
    +---------------------------------------+
    SQL> help bugs
    [Bunch of stuff omitted]
    SQLRowCount returns 31
    31 rows fetched
    SQL>

    I did the delete and reconnected and the rows where created again.
    I am testing with two SQL statements right now from TOAD and from SQLPlus.
    A. select bugs."bug_id" as Ticket, bugs."short_desc", bugs."bug_status" AS Status, bugs."assigned_to", dump(bugs."short_desc") from "bugs"@BUGZ bugs where "bug_id" = 2;
    B. select bugs."bug_id" as Ticket, bugs."short_desc", bugs."bug_status" AS Status, bugs."assigned_to" from "bugs"@BUGZ bugs
    When I issue "A" I get good looking results. When I issue "B" I get an error.
    SQL> select bugs."bug_id" as Ticket, bugs."short_desc", bugs."bug_status" AS Status, bugs."assigned_to", dump(bugs."short_desc") from "bugs"@BUGZ bugs where "bug_id" = 2;
        TICKET
    short_desc
    STATUS                                                           assigned_to
    DUMP(BUGS."SHORT_DESC")
             2
    COMA computer has updates set to auto install  please disable and allow me to ch
    oose
    CLOSED                                                                     8
    Typ=1 Len=168: 0,67,0,79,0,77,0,65,0,32,0,99,0,111,0,109,0,112,0,117,0,116,0,101
        TICKET
    short_desc
    STATUS                                                           assigned_to
    DUMP(BUGS."SHORT_DESC")
    ,0,114,0,32,0,104,0,97,0,115,0,32,0,117,0,112,0,100,0,97,0,116,0,101,0,115,0,32,
    0,115,0,101,0,116,0,32,0,116,0,111,0,32,0,97,0,117,0,116,0,111,0,32,0,105,0,110,
    0,115,0,116,0,97,0,108,0,108,0,32,0,32,0,112,0,108,0,101,0,97,0,115,0,101,0,32,0
    ,100,0,105,0,115,0,97,0,98,0,108,0,101,0,32,0,97,0,110,0,100,0,32,0,97,0,108,0,1
    08,0,111,0,119,0,32,0,109,0,101,0,32,0,116,0,111,0,32,0,99,0,104,0,111,0,111,0,1
        TICKET
    short_desc
    STATUS                                                           assigned_to
    DUMP(BUGS."SHORT_DESC")
    15,0,101
    SQL> select bugs."bug_id" as Ticket, bugs."short_desc", bugs."bug_status" AS Status, bugs."assigned_to" from "bugs"@BUGZ bugs;
    ERROR:
    ORA-28528: Heterogeneous Services datatype conversion error
    ORA-02063: preceding line from BUGZ
    no rows selectedThe bugs table looks like this:
    CREATE TABLE `bugs` (
      `bug_id` mediumint(9) NOT NULL auto_increment,
      `assigned_to` mediumint(9) NOT NULL,
      `bug_file_loc` mediumtext,
      `bug_severity` varchar(64) NOT NULL,
      `bug_status` varchar(64) NOT NULL,
      `creation_ts` datetime default NULL,
      `delta_ts` datetime NOT NULL,
      `short_desc` varchar(255) NOT NULL,
      `op_sys` varchar(64) NOT NULL,
      `priority` varchar(64) NOT NULL,
      `product_id` smallint(6) NOT NULL,
      `rep_platform` varchar(64) NOT NULL,
      `reporter` mediumint(9) NOT NULL,
      `version` varchar(64) NOT NULL,
      `component_id` smallint(6) NOT NULL,
      `resolution` varchar(64) NOT NULL default '',
      `target_milestone` varchar(20) NOT NULL default '---',
      `qa_contact` mediumint(9) default NULL,
      `status_whiteboard` mediumtext NOT NULL,
      `votes` mediumint(9) NOT NULL default '0',
      `lastdiffed` datetime default NULL,
      `everconfirmed` tinyint(4) NOT NULL,
      `reporter_accessible` tinyint(4) NOT NULL default '1',
      `cclist_accessible` tinyint(4) NOT NULL default '1',
      `estimated_time` decimal(7,2) NOT NULL default '0.00',
      `remaining_time` decimal(7,2) NOT NULL default '0.00',
      `deadline` datetime default NULL,
      `alias` varchar(20) default NULL,
      `cf_type` varchar(64) NOT NULL default '---',
      `cf_notes` mediumtext,
      `keywords` mediumtext NOT NULL,
      PRIMARY KEY  (`bug_id`),
      UNIQUE KEY `bugs_alias_idx` (`alias`),
      KEY `bugs_assigned_to_idx` (`assigned_to`),
      KEY `bugs_creation_ts_idx` (`creation_ts`),
      KEY `bugs_delta_ts_idx` (`delta_ts`),
      KEY `bugs_bug_severity_idx` (`bug_severity`),
      KEY `bugs_bug_status_idx` (`bug_status`),
      KEY `bugs_op_sys_idx` (`op_sys`),
      KEY `bugs_priority_idx` (`priority`),
      KEY `bugs_product_id_idx` (`product_id`),
      KEY `bugs_reporter_idx` (`reporter`),
      KEY `bugs_version_idx` (`version`),
      KEY `bugs_component_id_idx` (`component_id`),
      KEY `bugs_resolution_idx` (`resolution`),
      KEY `bugs_target_milestone_idx` (`target_milestone`),
      KEY `bugs_qa_contact_idx` (`qa_contact`),
      KEY `bugs_votes_idx` (`votes`),
      CONSTRAINT `fk_bugs_assigned_to_profiles_userid` FOREIGN KEY (`assigned_to`) REFERENCES `profiles` (`userid`) ON UPDATE CASCADE,
      CONSTRAINT `fk_bugs_component_id_components_id` FOREIGN KEY (`component_id`) REFERENCES `components` (`id`) ON UPDATE CASCADE,
      CONSTRAINT `fk_bugs_product_id_products_id` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON UPDATE CASCADE,
      CONSTRAINT `fk_bugs_qa_contact_profiles_userid` FOREIGN KEY (`qa_contact`) REFERENCES `profiles` (`userid`) ON UPDATE CASCADE,
      CONSTRAINT `fk_bugs_reporter_profiles_userid` FOREIGN KEY (`reporter`) REFERENCES `profiles` (`userid`) ON UPDATE CASCADE
    ) ENGINE=InnoDB AUTO_INCREMENT=4570 DEFAULT CHARSET=utf8;Edited by: Sky13 on Dec 22, 2011 1:36 PM

  • Problem connecting to Mysql using JDBC

    Hi Everyone,
    I am trying to connect Mysql ad java applet and I am using the Mysql jdbc connector.
    I Took the mysql-connector-java-5.0.8-bin.jar file and put that in the library of jdk.
    Now i used the following code to connect to the database using Netbeans.
    package testmysql;
    import java.sql.*;
    public class Main
    public static void main (String[] args)
    Connection conn = null;
    try
    String userName = "root";
    String password = "";
    String url = "jdbc:mysql://localhost/rpms";
    Class.forName ("com.mysql.jdbc.Driver").newInstance ();
    conn = DriverManager.getConnection (url, userName, password);
    System.out.println ("Database connection established");
    catch (Exception e)
    System.err.println ("Cannot connect to database server");
    finally
    if (conn != null)
    try
    conn.close ();
    System.out.println ("Database connection terminated");
    catch (Exception e) { /* ignore close errors */ }
    But it displays Cannot connect to database server
    thoughMysql server is running.
    Can anyone tell me wats the prob in this.
    thanks

    String url = "jdbc:mysql://localhost/rpms";
    Class.forName ("com.mysql.jdbc.Driver").newInstance ();
    Is rpms the MySQL database?
    Is the database on the default port 3306?
    Is the MySQL JDBC JAR file in the classpath of the applet?
    newInstance() is not required to be invoked unless using <= JDK 2.0
    Replace:
    catch (Exception e)
    System.err.println ("Cannot connect to database server");
    with:
    catch (Exception e)
    System.err.println (e.getMessage());
    Edited by: dvohra09 on Apr 10, 2009 10:54 PM
    Edited by: dvohra09 on Apr 10, 2009 10:55 PM
    Edited by: dvohra09 on Apr 10, 2009 10:58 PM

  • Need help connecting to wifi using PEAP

    Today is the first time I've even heard of PEAP. My condo told me that connect to the wifi here, I need to use the provided user name and password. When I tried connecting via my iPad and my android phone, they were able to detect that the wifi system is using PEAP and to connect me after I entered in the username and password.
    Now I'm trying to connect my laptop running archlinuxx, and wifimenu is unable to automagically figure out how to connect; it finds the correct SSID, but after I select it, it doesn't even prompt me for a username and password. It says:
    successfully initialized wpa_supplicant
    WPA Authentication/Association Failed
    After looking around a bit, I tried adding an entry to my /etc/wpa_supllicant/wpa_supplicant.conf file like this:
    network={
      ssid="MySSID"
      key_mgmt=WPA-EAP
      eap=PEAP
      identity="myusername"
      password="mypassword"
    I omitted ca_cert, phase1, phase2and priority, because I've no idea what to put for those values and it seems like my other devices can connect without asking me for those values. I'm just making guesses as to what the values should be for key_mgmt and eap.

    You'll have to give us some more info as far as error messages or screen shots (Shift-Command-3).

  • Connect to oracle using jdba thin driver

    i want to use jdbc thin driver to connect to oracle 8i for linux intel.
    my code is:
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    String dbURL = "jdbc:oracle:thin:@dbserver:1521:iasdb";
    Connection con = DriverManager.getConnection(dbURL,"scott","tiger");
    but an error is reported as "the network adapter can not establish connection".
    why?
    i can connect to oracle using JDBC-ODBC bridge successfully.

    i want to use jdbc thin driver to connect to oracle 8i for linux intel.
    my code is:
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    String dbURL = "jdbc:oracle:thin:@dbserver:1521:iasdb";
    Connection con = DriverManager.getConnection(dbURL,"scott","tiger");
    but an error is reported as "the network adapter can not establish connection".
    why?
    i can connect to oracle using JDBC-ODBC bridge successfully.

Maybe you are looking for

  • How to get af:commandbutton id in java code when it is triggered?

    Hi All In my application's homepage, I am using 2 af:commandbuttons and each using action attribute to call a method. Both are calling the same method, and based on its id, it should perform different operations. Could anyone please tell me how to ge

  • 10.4.6 update permissions problems

    Anyone know how to solve the permissions problems from the 10.4.6 update. For some reason after doing the update we can read only from our servers and they have a little lock icon next to them!! after searching the net a bit i know other people are h

  • Amount of used data per message

    Hi Can anyone tell me wether there is a way to see in XI 3.0 how much data a certain interface has used in a certain period, and wether this data can be exported to say BW? I am figuring out wether it is possible to have way of billing per amount of

  • Is there a max. length for a project?

    I have been working on a project of my trip to WDW.  It's already over an hour long.  I have started getting a message - Adobe Premiere Elements.exe has stopped working.  Could it be because the project is too big?

  • How  encode streaming and publish it to  youtube and livestream in one process ?

    Dears , We  start encode  to  youtube  and another process to livestreeam.com  , that conusmes   much of cpu , I want to configure to start encode to youtube and livestream.com in one process that will minimize CPU consuming for encoding  by 50% Kind