Buffer size for SQL statement using JDBC calls

I need to find out the buffer size for SQL statements in jave/JDBC because I need to insert or update a field that could be up to 4KB in size.

I'm not sure that I follow the question; I'm not sure which buffer size you're referring to.
If you have a field that can store up to 4k worth of data, you would create a VARCHAR2(4000) column in the Oracle database (assuming it is character data) or a BLOB column (if the data is binary). Either of those two fields can be populated from JDBC.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC

Similar Messages

  • Date formats for SQL statements used by recordset object

    Hi,
    Date formatting appears to be quite problematic for Business One.  I did a forum search for date issues and I don't think I saw any of them with an "answered" status.  I have an issue with formatting a date for the creation of an SQL statement that the DI sends to SQL Server 2005.  I need to format a date so that the localization parameters don't matter for either the client machine or SQL Server's machine.  We don't have a problem as long as our machines are localized as USA.
    I have PL 22 and I have a form - ours - where I use the Today() function to fill a date field.  So this is a date that is not entered by the user.  The result of this function is consistent with the localization parameters on my machine.  We have two other date fields on the form where the user must type in the date. 
    As a test, I changed my machine to the UK parameters.  I then set up the language parameters of Business One for English(United Kingdom).  I changed the date format specifications in Business One so that its format is dd/mm/yy.  I then brought up the form and the field that is formatted by the above function arrived in the form's field as dd/mm/yy.  I then typed in the two other dates in the same format and added the record to the database.  The form's table is user-defined. 
    I dismissed the form then brought it back up loaded with the new record.  The date that was entered by the function appeared in USA format (mm/dd/yy).  The dates that were typed in appeared in the Business One format (dd/mm/yy).  This of course is not consistent.
    When I looked at what got into the database, the formats were the opposite.  Weird!  To make matters really confusing, I run an SQL statement within SQL Server Mgt Studio, and use the WHERE clause to filter on the date that was based on the function.  It didn’t matter what format I used for the WHERE clause, the record came up.  Does anyone have any idea about how I can ensure that I always use the correct date format for SQL statements passed by Business One to SQL Server regardless of where in the world the application is being run?
    Thanks,
    Mike

    Ian,
    Here's what I'm concerned about:  I’m using the date in a “WHERE” clause.
    Assume the date is Aug 3, 2007.
    "SELECT * FROM Table WHERE StartDate > ‘8/3/2007’"
    OR
    "SELECT * FROM Table WHERE StartDate > ‘3/8/2007’"
    If the client machine is set up as USA, the today function will provide the date as formatted in the first query.  If the database server is setup as let’s say the UK, I believe that SQL Server query parser will interpret the date as Mar 8, 2007.
    If the client machine is set up as UK, the today function will provide the date as formatted in the second query.  If the database server is setup as let’s say USA, I believe that SQL Server query parser will also interpret the date as Mar 8, 2007.
    In both cases it would be wrong.
    I know I could use the DATEPART function to get the three parts and this will make the code indifferent to the localization specs of the client machine.  I need to then be able to concatenate those date parts for the “WHERE” clause so that the localization specifications of the database server don’t matter.
    Thanks,
    Mike

  • Is it possible to use Jdeveloper with Other Sql Server using JDBC-ODBC bri

    I have been able to successfully establish connection with Sql server Using JDBC-ODBC bridge, but when i run the application and perform some operations such as insert the following errors occur:
    (oracle.jbo.SQLStmtException) JBO-27122: SQL error during statement preparation. Statement: SELECT ItmUnit.ORG_CODE, ItmUnit.UNIT_CODE, ItmUnit.UNIT_NAME, ItmUnit.ADDRESS1, ItmUnit.ADDRESS2, ItmUnit.ADDRESS3, ItmUnit.CITY_CODE, ItmUnit.USER_ID, ItmUnit.TIME_STAMP FROM ITM_UNIT ItmUnit
    ----- LEVEL 1: DETAIL 0 -----
    (java.sql.SQLException) [DataDirect][ODBC Sybase Wire Protocol driver]Sybase does not allow more than one active statement when retrieving results without a cursor
    (oracle.jbo.DMLException) JBO-26041: Failed to post data to database during "Insert": SQL Statement "INSERT INTO IMMS.HRM_UNIT(UNIT_CODE,UNIT_NAME) VALUES (?,?)".
    ----- LEVEL 1: DETAIL 0 -----
    (java.sql.SQLException) [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt
    (oracle.jbo.AttrValException) JBO-27014: Attribute DeptCode in HrmUnitDept is required
    (oracle.jbo.SQLStmtException) JBO-27122: SQL error during statement preparation. Statement: SELECT HrmUnit.UNIT_CODE, HrmUnit.UNIT_NAME FROM IMMS.HRM_UNIT HrmUnit
    ----- LEVEL 1: DETAIL 0 -----
    (java.sql.SQLException) [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt

    Yes, you can do that. For testing purposes you can also create simple files (with mkfile) and add these to ASM. That way you could also experiment with deleting files and see what happens in ASM
    Bjoern

  • Set height size for each state enabling browser scrollbar if needed..

    I'm working on a flex project, completely new to it. I'm trying to resize my application based on the set height size for each state. I'd like the wrapper to resize in the browser so that the  browser's scroll bar appears if needed. hope this makes sense....
    My enitial opening page I've set the height to 1000. now when I click on a link to another state from this page, we'll call it 'home' which i have set to 2000
    The page opens in its 2000 height but no scroll bar appears to scroll down in the browser...
    If anyone's done this or knows how to, I'd really appreciate your input.

    I've done something similar with a few of my apps, you have to use a little javascript on the html page and the ExternalInterface class in your app. Basically, you need to resize the "browser's" height based on your flash file.  So here's quick example:
    In your html template page (which you can edit in your flashbuilder project panel ->html-template->indext.template.html)
    in your html add the jscript function:
    <script type="text/javascript">
             function setWindowHeight(heightVal){
                 document.getElementById('theWindow').style.height=heightVal; // make sure to give the body tag an id of 'theWindow' or whatever
    </script>
    In your flashbuilder app you need to call the javascript fx, you can use the ExternalInterface class for this:
      ExternalInterface.call('setWindowHeight',val+'px');
    you need to send the jscript fx the height of your container or whatever you want it resized to....

  • How to caluculate buffer size for import/exports in oracle

    Hi DBAS,
    how to caluculate buffer size for import exports,here is the formula but how can we use if there is a 100 of tables and datatypes,is the any query to find out rows_in_array ,maximum_row_size total schema and datbase
    buffer_size = rows_in_array maximum_row_size*
    Thanks,
    tmadugula

    http://download.oracle.com/docs/cd/B10501_01/server.920/a96652/ch01.htm
    Search "buffer"

  • Control the Batch Size for inseting tables using xi

    Hi Friends,
    Please let me know if we are able to control the batch size for inserting data using procedures for staging tables. Using SAP XI. Any blogs on this. or any information. please let us know.
    Thank you
    Regards
    Ramidi

    Hi Ramidi,
    There is something called message split on adapter engine but it won't guarantee a sequence of adapter calls.
    here is a blog about it:
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
    Maybe there is also an another simple way to do it.
    Regards,
    Wojciech
    <i>** Please reward points if found it useful **</i>

  • 'Missing select' error for update statement using WITH clause

    Hi,
    I am getting the below error for update statement using WITH clause
    SQL Error: ORA-00928: missing SELECT keyword
      UPDATE A
      set A.col1 = 'val1'
         where
      A.col2 IN (
      WITH D AS
      SELECT col2 FROM
      (SELECT col2, MIN(datecol) col3 FROM DS
      WHERE <conditions>
        GROUP BY PATIENT) D2
      WHERE
      <conditions on A.col4 and D2.col3>

    Hi,
    The format of a query using WITH is:
    WITH  d  AS
        SELECT  ...  -- sub_query
    SELECT  ...   -- main query
    You don't have a main query.  The keyword FROM has to come immediately after the right ')' that ends the last WITH clause sub-query.
    That explains the problem based on what you posted.  I can't tell if the real problem is in the conditions that you didn't post.
    I hope this answers your question.
    If not, post a complete test script that people can run to re-create the problem and test their ideas.  Include a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
    In the case of a DML operation (such as UPDATE) the sample data should show what the tables are like before the DML, and the results will be the contents of the changed table(s) after the DML.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • I need to increase my FMS buffer size for display video smoothly

    I need to increase my buffer size in FMS.
    Please let me know form where i would be increase my FMS buffer size.
    My video is running from RTMP and i faces the problem to load. video stalled between the running. so i need to increase buffer size for running video smoothly.
    Please reply me as soon as possible so i can resoled my problem.
    Thanks in advance.....

    Hi,
    You can increase the buffer size by using the property bufferTime of NetStream Object you are using. For eg: if ns is your NetStream Object then it can be done by ns.bufferTime=<desired value>.
    Also you can go through this
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/NetStream.html#bufferT ime.

  • Best buffer size for BufferedInput/Output Streams?

    I'm developing a client-server application where one server serves an undetermined number of clients. The server spins off threads to service each client individually. The clients send data (serialized objects) to each other via BufferedInput/OutputStreams wrapped in ObjectInput/OutputStreams. The streams are created like this:
    toServer = new ObjectOutputStream(new BufferedOutputStream(theSocket.getOutputStream()));
    fromServer = new ObjectInputStream(new BufferedInputStream(theSocket.getInputStream()));I've never had more than a handful (5-6) users on the system at one time, and it works fine. However, I haven't the resources to test the system with a large number of clients, and I'm wondering if the default buffer size is enough to handle a potentially large amount of traffic to a client. Should I increase the buffer size just in case, or should I not worry? Does the buffer size even matter when using an ObjectInput/OutputStream?
    I'd appreciate any good advice.

    There is an underlying buffer size of 1024 in ObjectIn/OutputStream anyway so the buffer should be at least this large. Generally 4k is adequate unless you are doing very high data volumes in which case 16k, 32k, 63k may help. If you are on Windows you should also up the socket send/receive buffers which by default are 8k: change this to at least 28k. The precise value depends on the network link & in theory should be >= the bandwidth-delay product.

  • Do we need to format data and log files with 64k cluster size for sql server 2012?

    Do we need to format data and log files with 64k cluster size for sql server 2012?
    Does this best practice still applies to sql server 2012 & 2014?

    Yes.  The extent size of SQL Server data files, and the max log block size have not changed with the new versions, so the guidance should remain the same.
    Microsoft SQL Server Storage Engine PM

  • Where to see generated SQL statement from jdbc adapter?

    Hi everybody,
    where can I see the generated SQL statement from JDBC adapter?
    Regards Mario

    Yes and True lterally means the same, but alas XI does not understand literature..
    Just checked the note as well, as you are correct!
    Regards
    Bhavesh

  • Oracle to SQL Server using JDBC

    I would like to connect Oracle to SQL Server using JDBC and a java program in oracle using loadjava.
    I cannot seem to get a SQL Server driver to work when loaded into Oracle using loadjava. Outside of oracle, they work just fine. Within oracle, I receive class not found exceptions.
    PLEASE HELP!!!!!!!

    I would like to connect Oracle to SQL Server using JDBC and a java program in oracle using loadjava.
    I cannot seem to get a SQL Server driver to work when loaded into Oracle using loadjava. Outside of oracle, they work just fine. Within oracle, I receive class not found exceptions.
    PLEASE HELP!!!!!!!

  • Does Java support mutliple sql statements in one call?

    statment.executeUpdate("DROP DATABASE IF EXISTS diy55;CREATE DATABASE IF NOT EXISTS diy55 DEFAULT CHARACTER SET utf8;GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX,USAGE on diy55.* TO 'diy55'@'localhost' identified by 'diy55';FLUSH PRIVILEGES;");Java seemes doesn't support multiple sql statements in one call, just like PHP mysql_query(), is it?

    Then just extend the java.sql.Statement to your own Statement class and write logic which splits the given query at the right places and executes them one by one.
    That the mysql_query() already has it built-in wouldn't say that it isn't possible in Java. Comparing with PHP is a bit pointless, it is a completely different language.

  • Compile a procedure /SQL file using JDBC?

    Is there a way we can compile a procedure or even a smiple SQL file using JDBC?
    Or in other words can "@ <file name with path>" be done using JDBC? Has anyone tried this before?
    I have five different databases, and i want to be able to compile my stored procedures at once on all my 5 databases. So, if we know if this is possible in JDBC?
    THanks

    right, as a matter of fact i wanted some pointers on how to run these SQL commands using JDBC.
    Like, set serveroutput on
    set feedback on
    @ filename or start filename
    show error
    etc.

  • How to use Native SQL statement in JDBC receiver interface

    Dear All,
    Can any one please help us in using Native SQL statement in a JDBC receiver channel. The reason why I need to use Native SQL statement instead of standard XML structure is that I need to execute a dynamic SQL query in third party database system lke:-
    Select Field1 Field2 from TABLE Where Field3 like "%Name'
    I expect the the response in the form of XML file which I can pick up using synchornous interface as mentioned on help.sap.com:-
    http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    The value for %Name can change dynamically according to the transaction and hence cannot be inluded as a KEY element in standard XLM structure,
    Hence I need to know:-
    1. What message mapping I should use in case if I have to use Native SQL statement.
    2.What operation mapping I should use in case if I have to use Native SQL statement.
    If guess correclty I may have to use Java mapping to do the above activities. Hence I want to know
    3 .How do to go about it to do the Java mapping.
    Thanks
    Ameet

    >
    Ameet Deshpande wrote:
    > Dear All,
    >
    > Can any one please help us in using Native SQL statement in a JDBC receiver channel. The reason why I need to use Native SQL statement instead of standard XML structure is that I need to execute a dynamic SQL query in third party database system lke:-
    >
    > "
    > Select Field1 Field2 from TABLE Where Field3 like "%Name'
    > "
    > I expect the the response in the form of XML file which I can pick up using synchornous interface as mentioned on help.sap.com:-
    >
    > http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    > http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    >
    > The value for %Name can change dynamically according to the transaction and hence cannot be inluded as a KEY element in standard XLM structure,
    >
    > Hence I need to know:-
    >
    > 1. What message mapping I should use in case if I have to use Native SQL statement.
    > 2.What operation mapping I should use in case if I have to use Native SQL statement.
    > If guess correclty I may have to use Java mapping to do the above activities. Hence I want to know
    > 3 .How do to go about it to do the Java mapping.
    >
    > Thanks
    > Ameet
    You can use a stored procedure, and call it from jdbc receiver adapter.
    I also solve this issue, with a DBLookup in message mapping. You can refer to my blog, and this usefull 3d:
    http://simonlesflex.wordpress.com/2010/12/07/pi-oracle-dblookup/
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler

Maybe you are looking for

  • Multiple serial ports reading from a shared USB port

    I have a program that reads from 4 flow controllers, which send data through RS232 serial ports. Because the computer is located pretty far away, the vendor suggested to use an Edgeport box to convert RS232 to USB, then convert to ethernet port using

  • Is there a way to download files from the internet from my iPod?

    Such as pictures, music, or video? When I go to a downloading music site I can only listen to the music, not download it. Is there any way to do the right click save as action from the iPod?

  • Find replace color [JS CS5]

    This could be a very novice question but after a lot of brainstorming, I couln't resolve it. I need to replace Registration color in anywhere in document with Balce color. I tried var doc = app.activeDocument; app.findObjectPreferences = app.changeOb

  • HT1349 Can I use headphones to listen to Pandora radio without it being broadcast through the speakers?

    I tried to listen to Pandora radio through the headphones,  without music being broadcast through  the speakers.  Have not been able to do this and want to know if it is possible and how to listen this way.

  • Workflow Prelude-Premiere-Speedgrade

    Hello, I'm trying to arrange a workflow using Prelude to create subclips from original footage, send the subclips to edit in Premiere, then exporting in Speedgrade to grade and 3d adjusting (I'm working on a stereoscopic project). My problem is that