How to use a jdbc driver in caf

Hi, all.
     I tried to make a ws to access DB with CAF, but I had no idea how to use a jdbc driver(.jar).
    Can anyone do me a favor? Thx 
    PS: my server is ce7.1
Edited by: Louis HUANG on Jul 27, 2009 1:09 PM

hi
If you want to interact with db tables in caf,try like this.
it may work..
Using EJB call database tables using jdbc driver.
Expose EJB as webservice.
and using External service option of caf utilise this webservice in caf,do the necessary mappings..
you can search in sdn,how to call DB tables in EJB..
Regards
sowmya.

Similar Messages

  • How to use Oracle jdbc driver fixedString property?

    Oracle pads values in char columns so if I insert "a" in a CHAR(2) column then I cannot get that record by comparing that column to "a", I should get it by comparing it to "a ". Right?
    To solve this problem the Oracle jdbc driver has the property fixedString but I cannot make it work. (look for fixedString here )
    I'm using ojdbc14.jar driver for Oracle 10gR2 and accessing an Oracle 10gR2 database.
    This is my code:
    try {
    Properties props = new Properties();
    props.put("user", "****");
    props.put("password", "****");
    props.put("fixedString", true);
    Class.forName("oracle.jdbc.driver.OracleDriver");
    String jdbcUrl = "jdbc:oracle:thin:@<host>:<port>:<sid>";
    Connection connection = DriverManager.getConnection(jdbcUrl, props);
    PreparedStatement ps = connection.prepareStatement(
    "SELECT * FROM MY_TABLE WHERE MY_TABLE_ID = ?");
    ps.setObject(1, "abc"); // (*)
    // MY_TABLE_ID is CHAR(15)
    ResultSet rs = ps.executeQuery();
    while (rs.next())
    System.out.print("data: ");
    System.out.println(rs.getString("MY_TABLE_ID"));
    rs.close();
    ps.close();
    connection.close();
    } catch (SQLException ex) {
    ex.printStackTrace();
    } catch (ClassNotFoundException ex) {
    ex.printStackTrace();
    The above code executes fine (no exceptions thrown) but the ResultSet is empty after executeQuery().
    If I change the line (*) for
    ps.setObject(1, "abc ");
    Then I get the column I wanted. So it seems the driver is ignoring the fixedString option.
    I've also tried changing the line (*) for
    ps.setObject(1, "abc", java.sql.Types.CHAR);
    But the ResultSet I get is empty again. What am I missing?
    Thanks in advance

    Es un Bug se corrige en la versión del OAS 10.1.2.3
    Bug 10222534: UNABLE TO SET FIXEDSTRING PROPERTY IN DATASOURCE

  • How to use Oracle jdbc driver fixedString property in datasource.xml?

    I try configured fixedString property in the datasource.xml but doesnt work, this is in oc4j
    <data-source location="jdbc/prueba" class="com.evermind.sql.DriverManagerDataSource"
    password="xxxxx"
    max-connect-attempts="3"
    xa-location="jdbc/xa/prueba"
    ejb-location="jdbc/prueba"
    wait-timeout="1800"
    connection-driver="oracle.jdbc.driver.OracleDriver"
    username="xxxx" min-connections="35"
    max-connections="300"
    url="jdbc:oracle:thin:@144.1.0.54:1521:nodox"
    inactivity-timeout="300" name="jdbc/prueba">
    <property name="fixedString" value="true"/>
    </data-source>
    i Solved this problem in tomcat:
    <Resource name="jdbc/testsql" auth="Container"
    type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver"
    url="jdbc:oracle:thin:@144.1.0.54:1521:nodox"
    username="xxxxx" password="xxxxxxxx"
    maxActive="8" maxIdle="4" connectionProperties="fixedString=true;"/>

    Es un Bug se corrige en la versión del OAS 10.1.2.3
    Bug 10222534: UNABLE TO SET FIXEDSTRING PROPERTY IN DATASOURCE

  • How to efficiently use an jdbc driver

    hi,
    I have used ifxjdbc.jar for connecting to informix server.
    But i have used that only for query execution.
    I want to know how one can efficiently use a jdbc driver.
    What all the classes that are coming with a .jar file.
    Please help me
    thankz to all

    Add ifxjdbc.jar to classpath.
    Driver Class name is com.informix.jdbc.IfxDriverConnection url is jdbc:informix-sqli://<host>:<port>/<database>:INFORMIXSERVER=<server>Datasource class is com.informix.jdbcx.IfxDataSource

  • Is it supported to use Microsoft JDBC driver use in Java 7 (and 8) multithreaded applications?

    Hello everone
    is it supported to use Microsoft JDBC driver (the latest version) with Java 7 multithreaded application?
    I am planning to use standard Java 7 threads library and use separate JDBC objects per each thread, i.e. Java threads will not share any JDBC objects among them, only the thread-safe Java collections/data structures will be shared between threads (such as
    ConcurrentHashMap etc). The JDBC connections, resultsets, statements, etc will be created and dedicated per each individual thread.
    If it is supported - do you expect this design to scale-up well or am I better off using multiple but single-threaded Java/JBDC programs to access SQL Server 2012/2014 from Microsoft JDBC driver?
    Thanks
    Yuri Budilov
    Yuri Budilov Melbourne Australia

    >is it supported to use Microsoft JDBC driver (the latest version) with Java 7 multithreaded application?
    Yes, so long as:
    > Java threads will not share any JDBC objects among them,
    >do you expect this design to scale-up well or am I better off using multiple but single-threaded Java/JBDC programs >to access SQL Server 2012/2014 from Microsoft JDBC driver?
    Using threads should scale better than using processes (at least on Windows), as there is quite a bit of overhead with a process.  Each process has it's own JRE, it's own GC heap, its own threads...
    The bigger question, though, is how this scales on the SQL Server.  Your throughput may be limited by resources on your database server, and the thread's workloads may not be able to run concurrently because of locking. 
    David
    David http://blogs.msdn.com/b/dbrowne/

  • How can i install jdbc driver

    Hi
    i install websphere 5 and try to connect to my sql server but cannot find jdbc driver class path and can not find any jdbc driver
    pls tell me how can i install jdbc driver in my websphere
    with regards

    You may get a better response posting this question in a WebSphere specific forum. Maybe this will help, the following link shows the command you need to execute to install a JDBC driver in websphere 5.0.
    http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?tab=search&searchWord=mysql+driver&maxHits=50

  • How to use external hard drive and iTunes together?

    how to use external hard drive and iTunes together?

    Yes I did get to that part.... I went trough external to retrive itunes folder... When I selected the folder, it said that it was locked, choose another folder... I then went to my external again to my itunes folder and and used command I to see if folder was locked and it wasn't.... it was suggested on another forum to reboot.. which I did and still same problem... All I want to do is link my external hard drive that has my itunes playlist from another Mac to my new one.. and to also use the external as the main source for adding new songs to my playlist...

  • Problems showing german special characters using DB2 jdbc driver

    Hi JDBC gurus,
    In my application the special german characters(umlauts...) are not shown correctly when I'm using IBM jdbc driver(type 2). When I switch to jdbcodbc driver everything is correct. So is there any trick, some connection parameter, some property or something like this? Something like "setCharset" or "umlauts" or something? I could not find anything in web :-(
    It is also hard to imagine that nobody has faced this problem. Or it is very trivial...
    The second problem:
    I have downloaded a new driver (com.ibm.db2.jcc.DB2Driver) but when I try to connect with DB I'm getting
    com.ibm.db2.jcc.b.SqlException: No license present. What does it mean - no license? I'm going to clear with our DB admin if the reason can be that I have no rights to connect directly with DB without having client installed locally on my PC. This is only what comes to my mind.
    Environment:
    DB: DB2 7.x
    Web-Server: Tomcat 5.x
    Hibernate 3.1.x

    Actually the problem is ONLY symbol � - scharfes S. Other umlauts are shown correctly...
    What is wrong with that symbol????
    Many thanks in advance,
    Giorgi

  • How to use multiple tape drive for single filesystem on single client.

    Hello All.
    I want to backup single filesystem with multiple tape drive.
    Incase of Symantec veritas netbackup "NEW_STREAM" for multi-stream backup.
    Backup client has a  single backup filesystem like /data1  directory with 4 LTO6 drives.
    /data1 directory doesn't have a sub-direcotry, just present a files.
    If /data1 directory has a sub-directory like /data1/aaa, /data1/bbb, /data1/ccc , Is it possible to use multiple drives?
    Please anybody answer the questions.
    Thanks advanced.

    See how to use multiple tape drive from single client when I want to backup single filesystem?

  • How to use the dvd drive...?

    Hi Guys,
    Just bought my new 15" 2.53 Mhz Duo Core MacBook Pro a month ago but until now I haven't figured out how to use the DVD drive. Well I can't seem to find where it is actually... Does all MacBook Pro has dvd drive? Coz when I check back apple's website and look for the same macbook pro specification like my one, it has a dvd drive included so I thought my macbook has it for sure but can't or don't know how to use it... This is my first time to have an apple that's why...
    Hoping for your help..
    Thanks,
    Danny

    Hi there Danny.
    I believe you are looking for the location of the DVD drive... right?
    If you are looking at your computer while it is open, it should be on the right hand side... "under" the keyboard. There is a slit that allows the DVD to be inserted into the computer. I think if you start to insert a DVD in there (shiney side down) part way, it will suck it into the computer.
    (note: I'm not exactly sure, because I use a 7 year old iBook that has a pop-out DVD tray... but I think it will suck it in for you)

  • How to avoid oracle.jdbc.driver.OracleConnection using

    i'am new in Java but recently i've got a project on support.
    Problem:
    solution worked on jvm 1.4, now on 1.7.
    Respectively, class oracle.jdbc.driver.OracleConnection has been used.
    Now I need class oracle.jdbc.OracleConnection to use CLOB.createTemporary() but...I can't.
    According to the docs, it's enough to replace in code and config files one class declaration on another. But NO. I replaced all of them in all config files and anyway, there was only oracle.jdbc.driver.OracleConnection has been created. (there is no explicit declaration of connection type in code, everything is configured in config files)
    Project uses marven, mybatis-3.1.1. Database: oracle 9
    Driver: ojdbc14-9.2.0.5.jar contains both classes: both oracle.jdbc.driver.OracleConnection (for backward compatibility) and oracle.jdbc.OracleConnection.
    The matter is what should i do to use second one instead of first one.
    May be there is some java cache? I do not know...
    Anybody knows?

    Now I need class oracle.jdbc.OracleConnection to use CLOB.createTemporary() but...I can't.
    Why not? You have to explain, in detail, WHAT you are trying and WHY you say you "can't" do it.
    According to the docs, it's enough to replace in code and config files one class declaration on another.
    That is correct - this IS all that is required. Replace ALL references to 'oracle.jdbc.driver' in your code.
    But NO. I replaced all of them in all config files and anyway, there was only oracle.jdbc.driver.OracleConnection has been created. (there is no explicit declaration of connection type in code, everything is configured in config files)
    We can't SEE what 'config' information you say you changed. It is what is in the CODE that matters, not what is in a config file.
    If the 'oracle.jdbc.driver' package is being imported by your code and a reference to 'Connection' is made Java will use it from the first package that it finds the class in.
    You are using an ANCIENT jdbc jar file. That doc you linked to WARNS you that you should upgrade and that doc is over ten years old.
    Remove that old jdbc jar file and use the current driver. Also remove references to the old package and replace them with references to the new package.
    With code and jars that are that old you can expect to have problems trying to use additional features, especially extensions. I would be surprised if you didn't have other issues as well.
    You need to perform code review to find all of the references that need to be corrected.

  • How to use Multiple JDBC Drivers?

    Hi,
    I'm working with an application that connects to an Oracle 8 database and Oracle 10 databases as a single user/schema and then the application users all share the single Oracle user. When we use an Oracle 8 JDBC driver, then a module that inserts a large number of records (1500+) into an oracle table behaves inconsistently and either times out, pauses inserting records for exactly 1 hour, or throws an error. It also seems somewhat inconsistent from user to user.
    The problem goes away when we use an Oracle 10 or Oracle 11 JDBC driver. However, the Oracle 10 JDBC driver has a problem with truncating the hh:mi:ss from datetime column types to 00:00:00. This is a known Oracle error and I know there is a flag that can fix this with the Oracle 10 driver. However, with the way the JDBC driver gets installed in the application, we are unable to set that flag.
    Oracle 11 JDBC driver also doesn't have the Oracle 8 issue inserting a large number of records. However, we need to connect to an Oracle 8 database and Oracle 11 JDBC does not support that. The database is still active but being retired soon so no chance of upgrading to a newer Oracle version.
    I asked on the application forum (it's SAP Manufacturing Intelligence and Integration - MII) and was told the following. Data Server is a name for the connection to the database.
    "If the class packages are the same (assuming so since all of the oracle drivers I've seen use the same driver) then you can't have 2 at the same time, since they will overlap and you can't prioritize or point one data server to 8 and the other to 11."
    My experiments with trying to use two drivers have also shown this to be the case for what I tried.
    Any ideas or thoughts of how to make this work? We are using a JDK 1.5.
    Thanks for the help.
    Kerby Johnson

    The most reliable way would be to load each driver (and all code using it) using its own classloader.
    But that would likely be overly complicated.
    The most viable solution will likely be (especially as this is a short term project, you say it's going to be retired soon) to ensure a commit after every smaller subset of the total data volume and keep using the Oracle 8 drivers.
    Try forcing a commit after say every 100 records and see if you still have the timeout problems. Most likely this will take care of your problems at the cost of a slight performance decrease (but better somewhat less than optimal performance than risk database corruption or crashing applications, right?).

  • Connecting to SQLserver 2005 via Web Analysis using a JDBC driver

    We are currently working on a web analysis suite and have been trying to create a SQL spreadsheet data object.
    After downloading and supposedly installing the sqljdbc.jar driver, we are having problems getting a connection to MS SQL server 2005.
    We set the classpath to this driver in the operating system (Windows server 2003) but are unsure exactly how to set this classpath in Tomcat 5.0.28 as recommended by the help file. We have tried editing the catalina.bat and catalina.50.bat in the \Hyperion\common\appServers\Tomcat\5.0.28\bin folder to point to sqljdbc.jar, but to no avail.
    So....does anyone have any experience on setting up the JDBC driver for MSSQLServer 2005 and making a connection in Web Analysis. Could you please give a step by step account of how this is done?

    Hi,
    In the past I have used two methods either updating the registry for the web application or by placing the jar file in the following directory
    \Hyperion\deployments\Tomcat5\WebAnalysis\webapps\WebAnalysis\WEB-INF\lib
    If you do place it in that directory you will need to restart the web analysis web server.
    Then in web analysis studio go to file > new > database connection >Relational
    Select Microsoft SQL Server
    JDBC Driver
    com.microsoft.jdbc.sqlserver.SQLServerDriver
    Connection string
    jdbc:microsoft:sqlserver://<servername>:1433;DatabaseName=<dbname>;SelectMethod=cursor
    Enter username/password
    There is always the Merant SQL server connection that can be used as well.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to use oracle thin driver?...pls help

    Hello. I am trying to insert a word file into my Oracle 9i database using JSP. I have tomcat running as my standalone server. So far, i have been using the sun.jdbc.odbc driver to implement all my DB accesses. Recently however, i found out that in order to use Oracle specific objects such as BLOBS or BFILES, i have to use the oracle thin driver or OCI driver.
    So far, i have downloaded the thin driver and put it into the tomcat shared/common folder and also put the .jar file into my classpath. Now, i am having trouble as to how to call the oracle thin driver inside my JSP code.
    My previous code read as:
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection("jdbc:odbc:Andy","user","pass");
    How do i switch over to the oracle thin driver in JSP? Any help would be much appreciated. Thank you
    Andrew

    Class.forName ("oracle.jdbc.driver.OracleDriver");
    Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@hostname:port:SSID", "user", "password");

  • How to use oracle thin driver with jsp?...pls help

    Hello. I am trying to insert a word file into my Oracle 9i database using JSP. I have tomcat running as my standalone server. So far, i have been using the sun.jdbc.odbc driver to implement all my DB accesses. Recently however, i found out that in order to use Oracle specific objects such as BLOBS or BFILES, i have to use the oracle thin driver or OCI driver.
    So far, i have downloaded the thin driver and put it into the tomcat shared/common folder and also put the .jar file into my classpath. Now, i am having trouble as to how to call the oracle thin driver inside my JSP code.
    My previous code read as:
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection("jdbc:odbc:Andy","user","pass");
    How do i switch over to the oracle thin driver in JSP? Any help would be much appreciated. Thank you
    Andrew

    my code is:
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    conn = DriverManager.getConnection(sConnStr, sUser, sPassword);
    notice the driver --"oracle.jdbc.driver.OracleDriver"!
    and copy the class12.zip to lib path
    if still not work
    change the class12.zip to class12.jar
    good luck

Maybe you are looking for

  • Whether Shopping cart delivery date can be in past date!!

    Hello SRM Gurus, There is a requirement from my customer, it may be strange. The requirement is : Shopping cart (requestor) should be abe to save having delivery date as a past date  and  PO in SRM with same past date. Is there any BADI available or

  • Webutil_File_Transfer.Client_To_DB_With_Progress in Synchronous

    Hi, I am using the the webutil toolkit to do file transfer to and from the database. The webutil_file_transfer.Client_To_DB_With_Progress with the synchronous mode(i.e. asynchronous FALSE) locks the downloaded file from the database. I want to delete

  • Devices not connecting to extender. Is there a way to force them?

    Hey everyone, Here is a quick setup so you know what I'm working with: Basement--> modem-->airport extreme (hardwired) --> Extender (New extreme on 1st floor) --> Me with my devices on the 2nd floor. Like the post says, the extender is set up fine an

  • Open Illustrator and I get crazy colors all over

    When I open Illustrator, I get crazy colors all over in my work environment (not all over the screen and not just on the art board but in the whole environment.) The colors are not always the same. Opening and closing the file doesn't solve the probl

  • Print commands are disabled in File menu (Multisim 10)

    I want to print my circuit, but all Print commands in the File menu are grayed out. I do have a printer installed on my system, which works on other applications. I'm running Multisim 10 (Student Evaluation) on Windows Vista Ultimate 32-bit. Thanks,