User Profile

Collapse

Profile Sidebar

Collapse
giffy
giffy
Last Activity: Oct 3 '08, 10:13 PM
Joined: Aug 27 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • giffy
    replied to using setAutoCommit(false) in DB2 and MSSQL
    in DB2
    Thanks Sanjay. And sorry for delayed addendum

    for DB2 case when I am doing

    Code:
    setAutoCommit(false);
    nothing changes. And things seem to be working the same way as with the default setting of autoCommit mode on transaction level.

    When i tried to find the reason it was suggested that to get that working. You need to put the journaling on on DB2 file on which you want this feature to work....
    See more | Go to post

    Leave a comment:


  • why dun you try on your own.

    Use a parameter in your stored procedure.

    And while passing it make it two parameters.
    The first will be spaces 32K in leght. generate it using a loop.

    and add to the end Second parameter that is of your need with some value may be 'TEST'

    Then debug the application after calling it using java by making callable prepated statements. And see whether you...
    See more | Go to post

    Leave a comment:


  • Here is what I have used

    Code:
    String callQuery = "call " + pgmLibraryName + "/procName('" + inpParam + "')";
    
    ResultSet rs  = new BidderUtility().execStrSQL(callQuery);
    And the code for execStrSQL is

    Code:
    public  ResultSet execStrSQL(String s) throws SQLException
    	{
    
    		ResultSet resultset = null;
    		java.sql.CallableStatement callablestatement
    ...
    See more | Go to post

    Leave a comment:


  • giffy
    started a topic using setAutoCommit(false) in DB2 and MSSQL
    in DB2

    using setAutoCommit(false) in DB2 and MSSQL

    I need to use commit and rollback feature in DB2. With executeBatch() feature.

    I am facing the problems

    a) journalling features are contradicting with it
    what does that mean? And how to get rid of that.

    b) I am not sure what is the databse version. How to see the version of database and the compatibility as far as executeBatch() support is concerned

    c) Do we need it mandatorily...
    See more | Go to post

  • giffy
    started a topic how to set SelectMethod=cursor; for SQL 2000
    in Java

    how to set SelectMethod=cursor; for SQL 2000

    Hi Everyone,

    I am trying to use the
    Code:
    setAutoCommit(false)
    before doing the updates. So that in case of error I can use
    Code:
    rolloverTransaction().
    But while trying to do so I am getting this error.

    Code:
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection while in manual transaction mode.
    I am using a datasource to connect to the database. And using connection...
    See more | Go to post

  • giffy
    replied to String.split() not giving proper results
    in Java
    Thanks Guys. split() method with two arguments did the trick

    here is the code
    Code:
    String origAVNListStr = "~`L~`L~`L~`~`~`L~`";
    String[] strArr = origAVNListStr.split("~`", -1);
    for(int i=0;i<strArr.length;i++)
    {
         System.out.println(i+1 +"the next token - " + strArr[i]);
    }
    and the output is as desired with all the sapces being returned and not ignored...
    See more | Go to post

    Leave a comment:


  • giffy
    replied to String.split() not giving proper results
    in Java
    Thanks for the prompt reply.

    It is a dynamic array situation. The code was just to test what is going wrong.

    In addition -
    1. I dun know the array size before hand
    2. Also the data can be many blanks at the end
    3. these are data fields that I need to handle as that only
    to be specific
    Code:
    String theData = "";
    See more | Go to post

    Leave a comment:


  • giffy
    started a topic String.split() not giving proper results
    in Java

    String.split() not giving proper results

    HOW to get the spaces out of a delimited string ??
    here is a usage scenario where split() seems not to work
    Code:
    String origAVNListStr = "~`L~`L~`L~`~`~`L~`";
    String[] strArr = origAVNListStr.split("~`");
            
    for(int i=0;i<strArr.length;i++)
    {
           System.out.println(i+1 +"the next token - " + strArr[i]);
    }
    and the output is
    Code:
    1the next
    ...
    See more | Go to post

  • giffy
    replied to Splitting strings
    in Java
    HOW to get the spaces out of a delimited string ??

    here is a usage scenario where split() seems not to work

    Code:
     String origAVNListStr = "~`L~`L~`L~`~`~`L~`";
            String[] strArr = origAVNListStr.split("~`");
            
             for(int i=0;i<strArr.length;i++)
             {
    	System.out.println(i+1 +"the next token - " + strArr[i]);
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...