Is it possible to set JDBC  Driver CharacterSet

HI,
I'm trying to learn how the data conversion is being handled in oracle (ii.e, I wanted to check the behaviour by keeping orai18n.jar & removing it). My database character set is WE8ISO8859P1, and I would like to change different client side character sets & do some R&D related to my application.
So I want to know ....
->if we can set JDBC Driver Character set in any way.
->Is setting client character set is what is setting driver character set??
We are using Oracle 10g and getting connections using Datsource. When I try to get the driver character set using oracle.jdbc.driver.OracleConnection.getJdbcCsId(), it returns 31 (which is WE8ISO8859P1).But I didn't find any setter..or similar method.
I'm new to this Globalization thing.... so sorry if I'm asking dumb questions.... Could any one help me in this regard?? .
Thanks,

JDBC is not designed to support the notion of a driver character set. Any text data should be retrieved using ResultSet.getString() method and passed to the database using PreparedStatement.setString() method - except for CLOBs, which also accept Unicode character streams. These methods expect string data in Java Unicode encoding (UTF-16). If you need to output this data from an application is some other encoding, you should use standard Java conversion mechanisms - e.g. String.getBytes(charset) or new PrintWriter(file,charset).
The driver character set is an internal setting relevant for intermediate character set conversions between the driver and the database. It is determined automatically by the driver based on the database character set. The method oracle.jdbc.driver.OracleConnection.getJdbcCsId() is undocumented and should not be used.
-- Sergiusz

Similar Messages

  • Setting JDBC driver properties for DB

    Hi Experts,
    we have proxy to JDBC synchronous scenario, currently the messages are sitting in delivering status for long time.
    SAP Note 1078420 - based on this note i need to configure the following parameters
    driver:oracle.jdbc.ReadTimeout 1000
    driver:oracle.net.CONNECT_TIMEOUT 1000
    sqlquerytimeout
    these parameters for Oracle, i am connecting to MSSQL2005 so can anyone please tell me what are the parameters for MSSQL2005 ????
    Kind Regards,
    kwangmo ku

    Hello Flok,
    Check the queues using transactions SMQ1 (outbound)/SMQ2 (inbound). Resolve the displayed errors. You can cancel the messages from SXMB_MONI. Execute LUW if necessary and avoid deleting entries manually.
    Regards,
    Ravi.

  • How do I install the jdbc driver for sql server 2005, in sql developer 4.0 ?

    Hallo together
    I need access to tables in a MS SQL Server 2005 database.
    One possibility is the JDBC driver.
    How do i install this driver ?
    Thank you very much for your postings.

    Hi,
      This is from the documentation -
    Database: Third Party JDBC Drivers
    The Third Party JDBC Drivers pane specifies drivers to be used for connections to third-party (non-Oracle) databases, such as IBM DB2, MySQL, Microsoft SQL Server, or Sybase Adaptive Server. (You do not need to add a driver for connections to Microsoft Access databases.) To add a driver, click Add Entry and select the path for the driver:
    For Microsoft SQL Server or Sybase Adaptive Server: jtds-1.2.jar, which is included in the jtds-1.2-dist.zip download
    To find a specific third-party JDBC driver, see the appropriate website (for example, http://www.mysql.com for the MySQL Connector/J JDBC driver for MySQL, http://jtds.sourceforge.net/ for the jTDS driver for Microsoft SQL Server and Sybase Adaptive Server, or search at http://www.teradata.com/ for the JDBC driver for Teradata). For MySQL, use the MySQL 5.0 driver, not 5.1 or later, with SQL Developer release 1.5.
    You must specify a third-party JDBC driver or install a driver using the Check for Updates feature before you can create a database connection to a third-party database of that associated type. (See the tabs for creating connections to third-party databases in the Create/Edit/Select Database Connection dialog box.)
    Alternative:
    As an alternative to using this preference, you can click Help, then Check for Updates to install the JTDS JDBC Driver for Microsoft SQL Server and the MySQL JDBE Driver as extensions.
    Regards,
    Mike

  • Where to set JDBC properties in J2ee1.4?

    Hi
    Where do I set jdbc driver/url in J2ee1.4? Well in case of j2ee 1.2 there was a file default.properties where in required url and drivername had to be provided for the datasource.
    I cannot seem to find the same for the j2ee 1.4.
    I need to connect to DB2.
    Any help will be appretiated.Thank you in advance.
    Regards

    The J2EE 1.4 Tutorial has an example of creating a JDBC data source with the asadmin tool called from an asant script:
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/WebApp12.html#wp70019
    You can also edit the server config file directly:
    J2EE_HOME/domains/domain1/config/server.xml

  • Gor The result set is closed after switch to latest microsoft JDBC driver

    The same code works fine with the previous version of the microsoft JDBC driver, but throws
    com.microsoft.sqlserver.jdbc.SQLServerException: The result set is closed.
    for the JDBC driver 4.
    Please Help!
    Thanks.

    I found the same exception when dealing with ResultSetMetaData.
    Using the old driver (1.2.2828.100) it was possible to do something like:
    Statement s = con.createStatement();
    ResultSet r = s.executeQuery("select * from <table>");
    ResultSetMetaData m = r.getMetaData();
    r.close();
    s.close();
    int numCols = m.getColumnCount();
    But using the new driver (2.0.1803.100) it complains that the result set is closed.
    The solution was to keep the ResultSet and Statement open until after the ResultSetMetaData is no longer needed. It is somewhat inconvenient because before it was possible to have a utility method that would return a ResultSetMetaData object and not have to worry about keeping the Statement and ResultSet objects around.
    I was hoping for a speed increase for batch inserts by having the latest driver, sadly there is no performance gain.

  • Is it possible to set up a backup between two external drives

    Is it possible to set up a backup between two external drives?
    i use time machine to back up my imac onto an external 2T.
    i also have two external 3T drives.  i am looking for redundancy of data, tried software RAID and it failed.  i also see some limitations with RAID that a backup would avoid.
    thanks for sharing your expertise.
    be well,
    tony

    so thanks to all of you, particularly rkaufmann87 i have decided to stop the plan of setting up a software RAID set.  instead i have downloaded ccc and am in the process of setting up the secone 3t external drive as a clone.  i will use time machine to back up the internal hard drive only and if possible see if i can clone that as well onto one of the 3t's.
    this gives me the peace of mind i sounght and avoids the problem of total corruption that exists with the raid solution i was exploring.
    thank you all for making this an enjoyable and informative experience.  what a powerful community.
    be well
    tony

  • Is it possible to set up a bootable external hard drive

    Is it possible to set up an external hard drive by copying my system folders, etc from my Ibook to my firewire drive??? If not is there a way to do it w./o the system DVD

    Hi matthew,
    first of all: WELCOME TO THE DISCUSSIONS!
    Yes, it is possible, but you need certain devices and software. You cannot create a bootable external device with drag&drop only.
    In order to get a bootable hard disk you have to buy a firewire disk (USB is not a bootable inteerface with MacOS X). Then you have to make a bootable clone from your internal hard disk to the external. You can use backup utilities such as Carbon Copy Cloner to achieve this.
    If this answered your question please consider granting some stars: Why reward points?

  • Jdbc driver creates new thread for each statement with a query timeout set

    I am profiling a web application that is using the Microsoft JDBC driver, version 1.1 to connect to a sql server 2005 database. Each java.sql.Statement that is created, within the application, gets a query timeout value set on it ( statement.setQueryTimeout(...) ).
    I have discovered that the JDBC driver creates a new thread to monitor each Statement and the query timeout value. When the application is under load these threads are getting created faster then they are being destroyed and I am concerned that this will cause a performance problem in production.
    One option I have is to remove the query timeout value and the monitor threads will not be created, another is to change JDBC drivers.
    I'm curious is there any way to control this behavior so that these threads are not created or are managed more efficiently.  Is there a workaround that anyone is aware of?   Is this considered a bug?
    I have found a similar bug here for the 2000 driver:
    http://support.microsoft.com/default.aspx/kb/894552
    Cheers

    Hi,
    Thank you for using the Microsoft SQL Server JDBC driver.  You are correct that a new thread is started to monitor the query timeout when a statement is executed.  This is a potential performance issue that we may look at addressing in the upcoming v1.2 release.  The current behavior is not configurable.  The only workaround with the v1.1 driver is to limit your use of query timeouts to only those statements which you reasonably might expect to actually time out.
    We do take customer feedback very seriously, so if anyone else is concerned about this particular issue, please chime in and we will be able to give it appropriate weight.
    --David Olix [MSFT]

  • Setting options to mysql jdbc driver

    Hello All
    Well According to MYSQL setting the CLIENT_MULTI_STATEMENTS flag onto a
    connection should allow multi statements (eg more than one query pr call)
    But I have no idea how to configure BEA to call mysql with the optional
    parameters?
    (btw tried opt_flags=CLIENT_MULTI_STATEMENTS)
    Oliver Billing

    Joe Weinstein skrev:
    [email protected] wrote:
    Hello All
    Well According to MYSQL setting the CLIENT_MULTI_STATEMENTS flag onto a
    connection should allow multi statements (eg more than one query pr call)
    But I have no idea how to configure BEA to call mysql with the optional
    parameters?
    (btw tried opt_flags=CLIENT_MULTI_STATEMENTS)
    Oliver BillingHi. I assume you're using our connection pools, with the mysql driver.
    You would add the property and it's value to the driver properties list.
    JoeHey Joe
    I did
    CLIENT_MULTI_STATEMENTS = true (looked it up under mysql JDBC driver)
    Doesent work though.
    Thanks anyway

  • Is it possible to set a default music player for the music on my external hard drive while still keeping my iTunes the default player on my Mac ?

    Is it possible to set a default music player for the music on my external while still keeping my iTunes the default player on my Mac ?
    Message was edited by: Pellseidon

    There is no setting in the iPhone to set another default music player. The default is Music. If you are using another application, you are at the mercy of how that application operates as far as what occurs when it stops or errors out. The car is looking for music to play.

  • Coldfusion JDBC driver setting

    I have coldfusionmx 7 installed on red hat linux enterprise 4
    How can i change the coldfusion JDBC driver to oracle 10g
    JDBC driver, that's may be help me in solving problems " Net8
    protocol error" which occured when a stored procedure return ref
    cursor to coldfusion?

    The Technotes listed
    here may
    help.

  • How to setting up the sun.jdbc driver in servlet

    in my servlet i implemens the MetaData Interface, The Sun JDBC driver was Not support the getMetaData() function .. I dont knw why it was
    Pls hel me

    http://www.apple.com/support/iphone/assistant/airprint/

  • Setting up embedded OC4J in JDev to use P6Spy jdbc driver to Oracle

    I am currently working on an OC4J application using Oracle db, with JDeveloper. I'm having some trouble with the DataSourceUserManager, in that it appears to be emitting faulty SQL, but I don't know exactly what SQL is being emitted. Today, I'm trying to see if I can interject the P6Spy JDBC driver on the database client side so I can see exactly what SQL is being emitted. I've successfully used P6Spy in the past on other projects, so I believe it can work, although I didn't use it with Oracle before.
    Unfortunately, I'm having trouble figuring out how to inform JDeveloper of the location of the driver jar. I've added P6Spy as a library to my application, and I've found several XML files in my workspace and in the JDev configuration which contain an "orion-application" element, which contains "library" sub elements, several of which I've added "library" elements to specify the location of the driver jar. Despite that, when the embedded OC4J starts up, I still get this in the messages window:
    Error initializing data-source 'jdbc/OracleDS': DriverManagerDataSource driver 'com.p6spy.engine.spy.P6SpyDriver' not found
    Note that this occurs while OC4J is trying to initialize my UserManager subclass.
    I believe there is also some facility for turning on "tracing" with Oracle, but the person who knows about that isn't here today. It would be good if I could get P6Spy working today, so I can make some progress today (which is looking more unlikely by the second).

    You must place the p6spy.jar into <oc4j_home>/j2ee/home/lib directory.
    The datasources are initialized before any deployed application is started, and thus the p6spy.jar wont be in the classpath >when the appserver is started (if you put the jar in WEB-INF/lib).That's correct.
    Another question -- have anyone managed to get p6spy to work with a ConnectionPoolManager in a BC4J-project?? I get a ClassCastException from oracle.jbo.server.OracleSQLBuilder because it tries to cast a statement into an OracleStatement.You need to build the project using SQL92 and Java Type Map.
    See
    Re: Exp problem in Oracle 10gR2
    Re: error in form10g release 2

  • How to omit parameter values from exceptions thrown by the JDBC driver

    Is there a way to get the Oracle JDBC driver to omit the parameter values from the message when it throws an exception?
    We have an application that persists credit cards and when an exception is thrown by the driver, it's including the credit card number in the error message, which ultimately gets logged by the application. There are too many layers and locations, including OpenJPA, Spring, and our own application, where we'd have to massage the error data to remove that card number.
    For example, we get the following exception:
    Caused by: org.apache.renamed.openjpa.lib.jdbc.ReportingSQLException: ORA-20104: Permission denied
    ORA-06512: at "PROTEGRITY.PTY", line 57
    ORA-06512: at "PROTEGRITY.PTY", line 383
    ORA-06512: at "SUBSDSYS.TORDERPAYMENT_UPD", line 16
    ORA-04088: error during execution of trigger 'SUBSDSYS.TORDERPAYMENT_UPD'
    {prepstmnt 6603044
    UPDATE PAYMENT
         SET CARD_HOLDER_NAME = ?, CARD_TYPE = ?, EXPIRY_MONTH = ?, EXPIRY_YEAR = ?, GATEWAY = ?
         WHERE UIDPK = ?
    [params=(String) Test Test, (String) VISA, (String) 03, (String) 2012, (String) CREDITCARD, (long) 106901]} [code=20104, state=72000]
    at org.apache.renamed.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:192)
    at org.apache.renamed.openjpa.lib.jdbc.LoggingConnectionDecorator.access$800(LoggingConnectionDecorator.java:57)
    The actual content of the message appears to come from the JDBC driver, not OpenJPA.
    This particular example doesn't show the card number, but only exposed that possibility as a risk.
    BTW: before you ask, for PCI compliance we're using a database layer service to encrypt the card numbers before they're stored in the table.
    Thanks much.

    [email protected] wrote:
    The actual content of the message appears to come from the JDBC driver, not OpenJPA.Wrong. This is a dump of parameters used to execute a query - and it comes from some upper layer, not the JDBC driver.
    I would start looking at the source code starting here:
    org.apache.renamed.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:192)

  • .jar includes jdbc driver but doesn't work

    Hi
    I'm quite new with Java. I've just created my first app in java, it's some kind of CMS. I have to give to my friend who can only install JVM and I can't set up his computer, because he lives in other city. What's the problem then:
    I tried to compile (build) complete file with jdbc driver. And actually I've done it (when I open jar with winrar I see that mysql-connector.jar is there) but it's not working. I still have error:
    SQLException: com.mysql.jdbc.Driver
    No suitable driver
    08001
    It works fine when I'm running it with NetBeans, but built jar doesn't work at all.
    Please help me with this problem. I was searching in many forums for the same problem, but no one had it (I mean EXACTLY the same). I have had many problems already with adding connector to NetBeans project at the beginning, but finally I've done it after 2 days - reinstallation of NB solved the problem. Is it possible that's NB fault again?
    Thx for any clues
    Michael

    Hello,
    Try to include a Class-Path option in the Manifest of your jar and see if that works.
    Hope this helps

Maybe you are looking for

  • I lost the browser Yahoo page I had (have NO idea what happened) and I need to reestablish it. How?

    I some how lost the browser home page I had set up thru firefox using a Yahoo browser page> when I now open firefox I get some basic nothing kind of page with a Google search box sitting there. All my saved pages have also been wiped out. How do I re

  • Null Index Error When Sorting Standard Report Column

    I have a page in one of my application that contains three reports in three seperate regions within the page. You only see one report at a time, however, and control which one you see based on a sidebar table containing links that call javascript fun

  • How do I bypass trust computer if the screen doesn't work

    Hi, I have an iphone 5 that has a damaged screen. The phone was water damaged which has affected the screen. The screen turns on and shows the time as it usually would, but the 'touch' component of the screen has been damaged so I can't unlock the ph

  • Isight Camera as a Security Camera

    Is there any way in which I can log into my iMac at home from work and run my iSight camera, essentially using it as a security camera? Is there any software that does this? I would appreciate any specific information you could provide. Thank you.

  • Disappearing Calculated Data

    Running a worksheet in Discoverer 3.1.36 with some calculated columns that are having some very odd problems. Worksheet is a crosstab structured as follows: Orders Gross Profit Cost Mailed Net Profit Net Profit % Offer Code ### ####.## ####.## ####.#