PreparedStatement for Boolean type

hello guys,
I have a form whose values I need to insert into a MS Access database. I am doing this with the use of <jsp:usebean> tag, I have also defined a bean and compiled it into a class. The problem I am facing is that in my form I have a display check box, if checked its value will be 1.
So if suppose, the user will check this box, in the Access Table, the data type is Yes/No. It should accordingly check.
I am making use of the preparedstatement, and theres seems to be no SetBoolean method, as there are for setInt and setString.
How do I go about it ? I accepted the value as a string decalred a boolean variable and then again using the setString method tried to insert into the db but it doesnt work.
Please help

What version of Java are you using?
setBoolean

Similar Messages

  • Setting boolean type in registerOutParameter of a callablestatement.

    Hi all..,
    Plz..define how to set the registereOutParameter for boolean type....
    My StoredProcedure is returning OUT the following parameters :
    NUMBER,VARCHAR,BOOLEAN & CURSOR.
    So, for the above OUT params i setting registerOutParameter as follow :-
    CallableStatement cal_stmt;
    ......and after gettign the connection and calling the procedure using
    cal_stmt...
    NUMBER,VARCHAR,BOOLEAN & CURSOR.
    cal_stmt.registerOutParameter(1,OracleTypes.NUMBER);//for number
    cal_stmt.registerOutParameter(2,OracleTypes.VARCHAR);//for varchar
    cal_stmt.registerOutParameter(3, ?(How to set for boolean)...)
    cal_stmt.registerOutParameter(4,OracleTypes.CURSOR);//for cursor.
    Plz..define how to set the registereOutParameter for boolean type....
    very very..urgent...

    Andrew,
    I'm not clear on what you mean when you ask "try to load it ... doesn't
    resove the classes to the subclass."
    Can you post a code snip here and what you would expect to see?
    Roger
    "Andrew" <[email protected]> wrote in message news:3f4494e2$[email protected]..
    >
    I'm trying to create a schema with an abstract class and two subclasses.(see
    below)
    The xml saves fine, but when I try to load it the parser doesn't resolvethe classes
    to the subclass. Is there a way of setting the xsi:type as an attribute sothat
    when the file is loaded the classes are resolved to their correct type. Isthere
    a better way of doing this?
    Thanks in advance,
    Andrew
    <?xml version="1.0"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.books.org"
    xmlns="http://www.books.org"
    elementFormDefault="unqualified">
    <xsd:complexType name="PublicationType" abstract="true">
    <xsd:sequence>
    <xsd:element name="Title" type="xsd:string"/>
    <xsd:element name="Author" type="xsd:string"maxOccurs="unbounded"/>
    <xsd:element name="Date" type="xsd:year"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="BookType">
    <xsd:complexContent>
    <xsd:extension base="PublicationType">
    <xsd:sequence>
    <xsd:element name="ISBN" type="xsd:string"/>
    <xsd:element name="Publisher" type="xsd:string"/>
    </xsd:sequence>
    </xsd:extension>
    </xsd:complexContent>
    </xsd:complexType>
    <xsd:complexType name="MagazineType">
    <xsd:complexContent>
    <xsd:extension base="PublicationType">
    <xsd:sequence>
    <xsd:element name="A" type="xsd:string"/>
    <xsd:element name="B" type="xsd:string"/>
    </xsd:sequence>
    </xsd:extension>
    </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="BookStore">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Publication" maxOccurs="unbounded"type="PublicationType"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>

  • JAXB Default behaviour for Boolean

    Is there any way to modify JAXB default behaviour for boolean types when marshalling?
    The default behaviour for this type is to output "true" or "false", is there anyway of outputting "1" or "0"
    Thanks in advance

    29-Aug-2006
    01:43 AM
    steve_p wrote:
    Hi Edward,
    I've not suffered this issue myself but I have read on other forums that some people are also having the same problem as you.
    http://www.allaboutsymbian.com/forum/showthread.php?t=50226
    S.
    Thanks for the feedback - I'm not 100% sure, but I think it happened once I did a PC Suite backup as well - oh well ... not too much of a show stopper - I guess they'll hopefully fix this in the next release of the firmware
    Regards,
    Edward

  • PreparedStatement.getGeneratedKeys():  undefined for the type PreparedState

    All,
    I'm getting this exception:
    "The method getGeneratedKeys() is undefined for the type PreparedStatement" When I try to run this code:
    Connection con = (Connection)getConnection();
    PreparedStatement stmt = null;
    stmt = con.prepareStatement("INSERT INTO article (title, description, creationDate, createdBy) VALUES (?,?,?,?)");
    stmt.setString(1, title);
    stmt.setString(2, description);
    stmt.setDate(3, creationDate);
    stmt.setInt(4, createdBy);
    stmt.executeUpdate();
    ResultSet rs = stmt.getGeneratedKeys();Javadoc says PreparedStatement inherits getGeneratedKeys() from Statement. Then why does it go wrong?
    Thanks alot!

    No sorry, it is a compile time error.
    But I've solved the problem.
    I'm using WSAD and it was pointing to the wrong rt.jar (the one that comes with WSAD). I've changed it to the sun rt.jar and now it works fine!
    Thanks anyway!

  • How to set default values for boolean columns

    I'm trying to deploy some content types and columns into a site with a feature. All it's ok, except that I'm trying to set a default value for boolean columns with no success.
    I've tried to set default value at column level:
    <Field ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DisplayName="Se publican noticias en español"
    Type="Boolean" Hidden="FALSE" Group="Columnas ShaCon" >
    <Default>TRUE</Default>
    </Field>
    and at content type level:
    <FieldRef ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DefaultValue="TRUE" Required="TRUE" />
    But in any case, when i create a new item with this content type, default value is applied.
    Can anyone tell how to set default values for boolean columns?
    Thanks in advance,
    Regards,
    Sergio

    In the field definition you can set
    <Default>1</Default>
    or
    <Default>0</Default>
    How to set the default value Null?

  • How to map Boolean Types in Import Manager

    Hi,
    I have a issue in Import Manager for mapping Boolean Types.
    I have a field which has a single KEY and multilple values(for different languages).
    I want to map it to a field in a Tuple.
    I can map the Key to field name.
    But the values, I am not able to map. Could you help me here please.
    Thanks a lot in advance.
    Regards,
    Rashmi

    Hi Anton
    Format your GM Time source as YYYY:MM:DD:HH:NN:SS:TTT (e.g. 2010:02:19:14:34:28:000). Deviations from this format seem to confuse the IM.
    HTH,
    Mark

  • Data size bigger than max size for this type - DB Control

    All,
    We are using a Java Control to fetch and store data
    - it fetches data from a webservice through a webservice control
    - it stores data in to database using a database control (stores the data as BLOB)
    Here currently we facing an error - weblogic.jws.control.ControlException: ControlException on control databaseManager[Data size bigger than max size for this type: 4516]
    The data is definitely not overshooting the max capacity of BLOB which is 4 GB. Initially this process was overshooting the transaction time-out limit of 300 sec but currently this is well within the transaction time-out limit and error happens soon after the webservice returns the data.
    a. Are there any known issues with using BLOB's with database controls ?
    b. what are the options - if we face this error ?
    weblogic.jws.control.ControlException: ControlException on control databaseManager[Data size bigger than max size for this type: 4516]
         at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(JcsProxy.java:454)
         at $Proxy14.storeObject(Ljava.lang.String;Ljava.lang.Object;)V(Unknown Source)
         at com.pfizer.usp.uspdb.businessobjects.people.peoplemanagercontrol.CacheManager.storeInCache(Lcom.pfizer.usp.uspdb.businessobjects.people.peopledatabasemanager.PeopleDatabaseManager;Ljava.lang.Object;Ljava.lang.Object;)V(CacheManager.java:158)
         at com.pfizer.usp.uspdb.businessobjects.people.peoplemanagercontrol.PeopleServiceManagerImpl.getTurnoverModel(Lcom.pfizer.usp.uspdb.businessobjects.people.PeopleBaseVO;Z)Ljava.util.List;(PeopleServiceManagerImpl.jcs:1334)
         at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
         at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(DispMethod.java:371)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Ljava.lang.Object;Ljava.lang.String;Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:423)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:396)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(Invocable.java:248)
         at com.bea.wlw.runtime.jcs.container.JcsContainer.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(JcsContainer.java:85)
         at com.bea.wlw.runtime.core.bean.BaseContainerBean.invokeBase(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(BaseContainerBean.java:224)
         at com.bea.wlw.runtime.core.bean.SLSBContainerBean.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(SLSBContainerBean.java:103)
         at com.bea.wlwgen.StatelessContainer_ly05hg_ELOImpl.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(StatelessContainer_ly05hg_ELOImpl.java:99)
         at com.bea.wlwgen.GenericStatelessSLSBContAdpt.invokeOnBean(Ljava.lang.Object;Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(GenericStatelessSLSBContAdpt.java:62)
         at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.runAsInvoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(BaseDispatcherBean.java:153)
         at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(BaseDispatcherBean.java:54)
         at com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(SyncDispatcherBean.java:168)
         at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(SyncDispatcher_k1mrl8_EOImpl.java:46)
         at com.bea.wlw.runtime.core.dispatcher.Dispatcher.remoteDispatch(Lcom.bea.wlw.runtime.core.dispatcher.DispFile;Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(Dispatcher.java:161)
         at com.bea.wlw.runtime.core.dispatcher.ServiceHandleImpl.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Ljava.lang.Object;(ServiceHandleImpl.java:436)
         at com.bea.wlw.runtime.core.dispatcher.WlwProxyImpl._invoke(Lcom.bea.wlw.runtime.core.request.ExecRequest;)Ljava.lang.Object;(WlwProxyImpl.java:326)
         at com.bea.wlw.runtime.core.dispatcher.WlwProxyImpl.invoke(Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(WlwProxyImpl.java:315)
         at $Proxy12.getTurnoverModel(Lcom.pfizer.usp.uspdb.businessobjects.people.PeopleBaseVO;Z)Ljava.util.List;(Unknown Source)
         at portlets.PeopleStaffing.StaffingController.begin()Lcom.bea.wlw.netui.pageflow.Forward;(StaffingController.jpf:356)
         at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
         at com.bea.wlw.netui.pageflow.FlowController.invokeActionMethod(Ljava.lang.reflect.Method;Lorg.apache.struts.action.ActionForm;Ljavax.servlet.http.HttpServletRequest;Lorg.apache.struts.action.ActionMapping;)Lorg.apache.struts.action.ActionForward;(FlowController.java:1519)
    Caused by: java.sql.SQLException: Data size bigger than max size for this type: 4516
         at oracle.jdbc.dbaccess.DBError.throwSqlException(Ljava.lang.String;Ljava.lang.String;I)V(DBError.java:134)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(ILjava.lang.Object;)V(DBError.java:179)
         at oracle.jdbc.ttc7.TTCItem.setArrayData(Z[B)V(TTCItem.java:95)
         at oracle.jdbc.dbaccess.DBDataSetImpl.setBytesBindItem(III[B)Z(DBDataSetImpl.java:2413)
         at oracle.jdbc.driver.OraclePreparedStatement.setItem(II[B)V(OraclePreparedStatement.java:1166)
         at oracle.jdbc.driver.OraclePreparedStatement.setBytes(I[B)V(OraclePreparedStatement.java:2208)
         at oracle.jdbc.driver.OraclePreparedStatement.setObject(ILjava.lang.Object;II)V(OraclePreparedStatement.java:3002)
         at oracle.jdbc.driver.OraclePreparedStatement.setObject(ILjava.lang.Object;I)V(OraclePreparedStatement.java:3107)
         at weblogic.jdbc.wrapper.PreparedStatement.setObject(ILjava.lang.Object;I)V(PreparedStatement.java:244)
         at com.bea.wlw.runtime.core.control.DatabaseControlImpl._setParameter(Ljava.sql.PreparedStatement;ILjava.lang.Object;I)V(DatabaseControlImpl.jcs:1862)
         at com.bea.wlw.runtime.core.control.DatabaseControlImpl.getStatement_v2(Ljava.lang.reflect.Method;[Ljava.lang.Object;ZLjava.lang.String;)Ljava.sql.PreparedStatement;(DatabaseControlImpl.jcs:1708)
         at com.bea.wlw.runtime.core.control.DatabaseControlImpl.invoke(Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(DatabaseControlImpl.jcs:2567)
         at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(DispMethod.java:377)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Ljava.lang.Object;Ljava.lang.String;Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:423)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:396)
         at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(JcsProxy.java:388)
         at $Proxy13.insertObject(Ljava.lang.String;Ljava.lang.Object;)V(Unknown Source)
         at com.pfizer.usp.uspdb.businessobjects.people.peopledatabasemanager.PeopleDatabaseManagerImpl.storeObject(Ljava.lang.String;Ljava.lang.Object;)V(PeopleDatabaseManagerImpl.jcs:263)
         at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Optimized Method)
         at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(DispMethod.java:371)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Ljava.lang.Object;Ljava.lang.String;Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:423)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:396)
         at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(JcsProxy.java:381)
         at $Proxy14.storeObject(Ljava.lang.String;Ljava.lang.Object;)V(Unknown Source)
         at com.pfizer.usp.uspdb.businessobjects.people.peoplemanagercontrol.CacheManager.storeInCache(Lcom.pfizer.usp.uspdb.businessobjects.people.peopledatabasemanager.PeopleDatabaseManager;Ljava.lang.Object;Ljava.lang.Object;)V(CacheManager.java:158)
         at com.pfizer.usp.uspdb.businessobjects.people.peoplemanagercontrol.PeopleServiceManagerImpl.getTurnoverModel(Lcom.pfizer.usp.uspdb.businessobjects.people.PeopleBaseVO;Z)Ljava.util.List;(PeopleServiceManagerImpl.jcs:1334)
         at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Sudeep SV wrote:
    All,
    We are using a Java Control to fetch and store data
    - it fetches data from a webservice through a webservice control
    - it stores data in to database using a database control (stores the data as BLOB)
    Here currently we facing an error - weblogic.jws.control.ControlException: ControlException on control databaseManager[Data size bigger than max size for this type: 4516]
    The data is definitely not overshooting the max capacity of BLOB which is 4 GB. Initially this process was overshooting the transaction time-out limit of 300 sec but currently this is well within the transaction time-out limit and error happens soon after the webservice returns the data.
    a. Are there any known issues with using BLOB's with database controls ?
    b. what are the options - if we face this error ?
    Hi Sudeep. The problem is that WLW is trying to set the datum as a byte array
    and the oracle driver won't take a byte array that big. Please check whether
    WebLogic Workshop has any explicit instructions for BLOB data. Otherwise, do
    contact official BEA support for your WebLogic WorkShop issue.
    Joe
    weblogic.jws.control.ControlException: ControlException on control databaseManager[Data size bigger than max size for this type: 4516]
         at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(JcsProxy.java:454)
         at $Proxy14.storeObject(Ljava.lang.String;Ljava.lang.Object;)V(Unknown Source)
         at com.pfizer.usp.uspdb.businessobjects.people.peoplemanagercontrol.CacheManager.storeInCache(Lcom.pfizer.usp.uspdb.businessobjects.people.peopledatabasemanager.PeopleDatabaseManager;Ljava.lang.Object;Ljava.lang.Object;)V(CacheManager.java:158)
         at com.pfizer.usp.uspdb.businessobjects.people.peoplemanagercontrol.PeopleServiceManagerImpl.getTurnoverModel(Lcom.pfizer.usp.uspdb.businessobjects.people.PeopleBaseVO;Z)Ljava.util.List;(PeopleServiceManagerImpl.jcs:1334)
         at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
         at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(DispMethod.java:371)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Ljava.lang.Object;Ljava.lang.String;Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:423)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:396)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(Invocable.java:248)
         at com.bea.wlw.runtime.jcs.container.JcsContainer.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(JcsContainer.java:85)
         at com.bea.wlw.runtime.core.bean.BaseContainerBean.invokeBase(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(BaseContainerBean.java:224)
         at com.bea.wlw.runtime.core.bean.SLSBContainerBean.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(SLSBContainerBean.java:103)
         at com.bea.wlwgen.StatelessContainer_ly05hg_ELOImpl.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(StatelessContainer_ly05hg_ELOImpl.java:99)
         at com.bea.wlwgen.GenericStatelessSLSBContAdpt.invokeOnBean(Ljava.lang.Object;Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(GenericStatelessSLSBContAdpt.java:62)
         at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.runAsInvoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(BaseDispatcherBean.java:153)
         at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(BaseDispatcherBean.java:54)
         at com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(SyncDispatcherBean.java:168)
         at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(SyncDispatcher_k1mrl8_EOImpl.java:46)
         at com.bea.wlw.runtime.core.dispatcher.Dispatcher.remoteDispatch(Lcom.bea.wlw.runtime.core.dispatcher.DispFile;Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(Dispatcher.java:161)
         at com.bea.wlw.runtime.core.dispatcher.ServiceHandleImpl.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Ljava.lang.Object;(ServiceHandleImpl.java:436)
         at com.bea.wlw.runtime.core.dispatcher.WlwProxyImpl._invoke(Lcom.bea.wlw.runtime.core.request.ExecRequest;)Ljava.lang.Object;(WlwProxyImpl.java:326)
         at com.bea.wlw.runtime.core.dispatcher.WlwProxyImpl.invoke(Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(WlwProxyImpl.java:315)
         at $Proxy12.getTurnoverModel(Lcom.pfizer.usp.uspdb.businessobjects.people.PeopleBaseVO;Z)Ljava.util.List;(Unknown Source)
         at portlets.PeopleStaffing.StaffingController.begin()Lcom.bea.wlw.netui.pageflow.Forward;(StaffingController.jpf:356)
         at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
         at com.bea.wlw.netui.pageflow.FlowController.invokeActionMethod(Ljava.lang.reflect.Method;Lorg.apache.struts.action.ActionForm;Ljavax.servlet.http.HttpServletRequest;Lorg.apache.struts.action.ActionMapping;)Lorg.apache.struts.action.ActionForward;(FlowController.java:1519)
    Caused by: java.sql.SQLException: Data size bigger than max size for this type: 4516
         at oracle.jdbc.dbaccess.DBError.throwSqlException(Ljava.lang.String;Ljava.lang.String;I)V(DBError.java:134)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(ILjava.lang.Object;)V(DBError.java:179)
         at oracle.jdbc.ttc7.TTCItem.setArrayData(Z[B)V(TTCItem.java:95)
         at oracle.jdbc.dbaccess.DBDataSetImpl.setBytesBindItem(III[B)Z(DBDataSetImpl.java:2413)
         at oracle.jdbc.driver.OraclePreparedStatement.setItem(II[B)V(OraclePreparedStatement.java:1166)
         at oracle.jdbc.driver.OraclePreparedStatement.setBytes(I[B)V(OraclePreparedStatement.java:2208)
         at oracle.jdbc.driver.OraclePreparedStatement.setObject(ILjava.lang.Object;II)V(OraclePreparedStatement.java:3002)
         at oracle.jdbc.driver.OraclePreparedStatement.setObject(ILjava.lang.Object;I)V(OraclePreparedStatement.java:3107)
         at weblogic.jdbc.wrapper.PreparedStatement.setObject(ILjava.lang.Object;I)V(PreparedStatement.java:244)
         at com.bea.wlw.runtime.core.control.DatabaseControlImpl._setParameter(Ljava.sql.PreparedStatement;ILjava.lang.Object;I)V(DatabaseControlImpl.jcs:1862)
         at com.bea.wlw.runtime.core.control.DatabaseControlImpl.getStatement_v2(Ljava.lang.reflect.Method;[Ljava.lang.Object;ZLjava.lang.String;)Ljava.sql.PreparedStatement;(DatabaseControlImpl.jcs:1708)
         at com.bea.wlw.runtime.core.control.DatabaseControlImpl.invoke(Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(DatabaseControlImpl.jcs:2567)
         at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(DispMethod.java:377)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Ljava.lang.Object;Ljava.lang.String;Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:423)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:396)
         at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(JcsProxy.java:388)
         at $Proxy13.insertObject(Ljava.lang.String;Ljava.lang.Object;)V(Unknown Source)
         at com.pfizer.usp.uspdb.businessobjects.people.peopledatabasemanager.PeopleDatabaseManagerImpl.storeObject(Ljava.lang.String;Ljava.lang.Object;)V(PeopleDatabaseManagerImpl.jcs:263)
         at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Optimized Method)
         at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(DispMethod.java:371)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Ljava.lang.Object;Ljava.lang.String;Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:423)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:396)
         at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(JcsProxy.java:381)
         at $Proxy14.storeObject(Ljava.lang.String;Ljava.lang.Object;)V(Unknown Source)
         at com.pfizer.usp.uspdb.businessobjects.people.peoplemanagercontrol.CacheManager.storeInCache(Lcom.pfizer.usp.uspdb.businessobjects.people.peopledatabasemanager.PeopleDatabaseManager;Ljava.lang.Object;Ljava.lang.Object;)V(CacheManager.java:158)
         at com.pfizer.usp.uspdb.businessobjects.people.peoplemanagercontrol.PeopleServiceManagerImpl.getTurnoverModel(Lcom.pfizer.usp.uspdb.businessobjects.people.PeopleBaseVO;Z)Ljava.util.List;(PeopleServiceManagerImpl.jcs:1334)
         at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
         at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • From 1 DB:Data size bigger than max size for this type

    I am getting error while inserting text file as a string in the table (oracle DB)as :java.sql.SQLException: Data size bigger than max size for this type: 11412
    This particular column is Long data type.
    The mystry is there is: In one DB instance the code is working fine without error but in other DB instance its giving the following Error:
    (CMessageLog.java:118) java.sql.SQLException: Data size bigger than max size for this type: 11412
    at oracle.jdbc.dbaccess.DBError.throwSqlException(Ljava/lang/String;Ljava/lang/String;I)V(DBError.java:134)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(ILjava/lang/Object;)V(DBError.java:179)
    at oracle.jdbc.ttc7.TTCItem.setArrayData(ZLjava/lang/String;I)V(TTCItem.java:147)
    at oracle.jdbc.dbaccess.DBDataSetImpl.setBytesBindItem(IIILjava/lang/String;)Z(DBDataSetImpl.java:2460)
    at oracle.jdbc.driver.OraclePreparedStatement.setItem(IILjava/lang/String;)V(OraclePreparedStatement.java:1190)
    at oracle.jdbc.driver.OraclePreparedStatement.setString(ILjava/lang/String;)V(OraclePreparedStatement.java:1610)
    at weblogic.jdbc.wrapper.PreparedStatement.setString(ILjava/lang/String;)V(PreparedStatement.java:638)
    Can anyone please help me out.
    Thanks,
    Joydeep Maiti

    Yes Rajat . Your are right
    I have pasted the code below. I am using "String" to hold the message (strQueueMessage). That should be the problem
    Pls let me know How should I overcome this problem.
    public void dbWriteLog(String strQueueMessage,
                   ExtractionEngineDetails objExtractionEngineDetails,
                   QueryBuilder objQueryBuilder) throws DBException
    objPrepStatement.setString(1,strQueueMessage);
    objPrepStatement.setDate(2,new Date(new java.util.Date().
                             getTime()));
                   objPrepStatement.setString(3, ExtractionUtils.getProperty(
                             ExtractionUtils.EXT_FAIL_TYPE2));
                   objPrepStatement.executeUpdate();
                   objPrepStatement.close();
                   stmt = conn.createStatement();
    Thanks
    Ashwin N.

  • Problem with boolean type in Informix via ODBC

    Hello,
    I'm connecting to an Informix database from an Oracle database via the ODBC Gateway. The connection works fine.
    However, when I select a boolean type column from a table in the Informix database, nothing is returned and I get the following error:
    SQL> select "stat" from bt@informix;
    ERROR:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Informix][Informix ODBC Driver]Restricted data type attribute violation.
    {07006,NativeErr = -11013}
    ORA-02063: preceding 2 lines from INFORMIX
    no rows selected
    Selecting a boolean type column with isql works fine. Other column types work from Oracle.
    Can anyone help me resolve this issue? Please find configuration details and traces below.
    Software stack:
    Informix Database: Enterprise Edition 12.10 for Linux x86_64
    Informix ODBC driver: Informix Client SDK Developer Edition 4.10 for Linux 64-bit
    Oracle Database: Enterprise Edition 11.2.0.1.0 64-bit (Oracle Linux 6.6 64-bit)
    UnixODBC: 2.3.2 x86_64
    odbcinst.ini:
    [Informix]
    Driver=/opt/IBM/informix/lib/cli/libifcli.so
    Setup=/opt/IBM/informix/lib/cli/libifcli.so
    APILevel=1
    ConnectFunctions=YYY
    DriverODBCVer=03.51
    FileUsage=0
    SQLLevel=1
    smProcessPerConnect=Y
    [ODBC]
    TraceFile=/tmp/odbc.log
    Trace = Yes
    odbc.ini:
    [ol_informix1210]
    Driver=Informix
    Description=Test connection
    Database=sysutils
    LogonID=informix
    pwd=informix
    Servername=ol_informix1210
    CursorBehavior=0
    DB_LOCALE=en_us.8859-1
    TRANSLATIONDLL=/opt/IBM/informix/lib/esql/igo4a304.so
    [ODBC]
    UNICODE=UCS-2
    ; Trace file Section
    Trace=1
    TraceFile=/tmp/odbctrace.out
    InstallDir=/opt/IBM/informix
    TRACEDLL=idmrs09a.so
    Oracle Gateway init.ora:
    HS_FDS_CONNECT_INFO=ol_informix1210
    HS_FDS_SHAREABLE_NAME=/usr/local/lib/libodbc.so
    HS_FDS_TRACE_LEVEL=debug
    HS_LANGUAGE=AMERICAN_AMERICA.WE8ISO8859P1
    Oracle Gateway trace:
    Entered hgoftch, cursor id 1 at 2015/04/14-12:22:03
    hgoftch, line 130: Printing hoada @ 0x2007fe0
    MAX:1, ACTUAL:1, BRC:100, WHT=5 (SELECT_LIST)
    hoadaMOD bit-values found (0x20:NEGATIVE_HOADADTY)
    DTY     NULL-OK  LEN  MAXBUFLEN   PR/SC  CST IND MOD NAME
    -7 BIT Y          1          1   0/  0    0   0  20 stat
    Performing delayed open.
    SQLBindCol: column 1, cdatatype: -28, bflsz: 1
    Entered hgopoer at 2015/04/14-12:22:03
    hgopoer, line 233: got native error -11013 and sqlstate 07006; message follows...
    [Informix][Informix ODBC Driver]Restricted data type attribute violation. {07006,NativeErr = -11013}
    Exiting hgopoer, rc=0 at 2015/04/14-12:22:03
    hgoftch, line 730: calling SQLFetch got sqlstate 07006
    0 rows fetched
    Exiting hgoftch, rc=28500 at 2015/04/14-12:22:03 with error ptr FILE:hgoftch.c LINE:730 FUNCTION:hgoftch() ID:Fetch resultset data
    ODBC trace:
    [ODBC][11041][1429005970.973443][SQLPrepare.c][196]
                    Entry:
                            Statement = 0x276ecb0
                            SQL = [SELECT A1. stat  FROM  BT  A1][length = 29]
    [ODBC][11041][1429005970.973914][SQLPrepare.c][371]
                    Exit:[SQL_SUCCESS]
    [ODBC][11041][1429005970.973940][SQLNumResultCols.c][156]
                    Entry:
                            Statement = 0x276ecb0
                            Column Count = 0x26f5868
    [ODBC][11041][1429005970.973970][SQLNumResultCols.c][248]
                    Exit:[SQL_SUCCESS]
                            Count = 0x26f5868 -> 1
    [ODBC][11041][1429005970.974097][SQLDescribeCol.c][247]
                    Entry:
                            Statement = 0x276ecb0
                            Column Number = 1
                            Column Name = 0x7fffc3ff2d90
                            Buffer Length = 31
                            Name Length = 0x7fffc3ff2ed4
                            Data Type = 0x7fffc3ff2ed8
                            Column Size = 0x7fffc3ff2e70
                            Decimal Digits = 0x7fffc3ff2edc
                            Nullable = 0x7fffc3ff2ee0
    [ODBC][11041][1429005970.974140][SQLDescribeCol.c][501]
                   Exit:[SQL_SUCCESS]               
                            Column Name = [stat]               
                            Data Type = 0x7fffc3ff2ed8 -> -7               
                            Column Size = 0x7fffc3ff2e70 -> 1               
                            Decimal Digits = 0x7fffc3ff2edc -> 0               
                            Nullable = 0x7fffc3ff2ee0 -> 1
    [ODBC][11041][1429005970.974192][SQLSetStmtAttr.c][265]
                    Entry:
                            Statement = 0x276ecb0
                            Attribute = SQL_ATTR_ROW_ARRAY_SIZE
                            Value = 0x64
                            StrLen = 0
    [ODBC][11041][1429005970.974218][SQLSetStmtAttr.c][925]
                    Exit:[SQL_SUCCESS]
    [ODBC][11041][1429005970.974230][SQLSetStmtAttr.c][265]
                    Entry:
                            Statement = 0x276ecb0
                            Attribute = SQL_ATTR_ROW_BIND_TYPE
                            Value = (nil)
                            StrLen = -5
    [ODBC][11041][1429005970.974249][SQLSetStmtAttr.c][925]
                    Exit:[SQL_SUCCESS]
    [ODBC][11041][1429005970.974837][SQLExecute.c][187]
                    Entry:
                            Statement = 0x276ecb0
    [ODBC][11041][1429005970.975231][SQLExecute.c][348]
                    Exit:[SQL_SUCCESS]
    [ODBC][11041][1429005970.975255][SQLSetStmtAttr.c][265]
                    Entry:
                            Statement = 0x276ecb0
                            Attribute = SQL_ATTR_ROW_STATUS_PTR
                            Value = 0x27f5b78
                            StrLen = -4
    [ODBC][11041][1429005970.975280][SQLSetStmtAttr.c][925]
                    Exit:[SQL_SUCCESS]
    [ODBC][11041][1429005970.975291][SQLSetStmtAttr.c][265]
                    Entry:
                            Statement = 0x276ecb0
                            Attribute = SQL_ATTR_ROWS_FETCHED_PTR
                            Value = 0x26f5850
                            StrLen = -4
    [ODBC][11041][1429005970.975311][SQLSetStmtAttr.c][925]
                    Exit:[SQL_SUCCESS]
    [ODBC][11041][1429005970.975326][SQLBindCol.c][236]
                    Entry:
                            Statement = 0x276ecb0
                            Column Number = 1
                            Target Type = -28 SQL_C_UTINYINT
                            Target Value = 0x27f5af8
                            Buffer Length = 1
                            StrLen Or Ind = 0x27f5eb8
    [ODBC][11041][1429005970.975349][SQLBindCol.c][341]
                    Exit:[SQL_SUCCESS]
    [ODBC][11041][1429005970.975367][SQLFetch.c][162]
                    Entry:
                            Statement = 0x276ecb0
    [ODBC][11041][1429005970.975455][SQLFetch.c][348]
                    Exit:[SQL_ERROR]
                    DIAG [07006] [Informix][Informix ODBC Driver]Restricted data type attribute violation.
    [ODBC][11041][1429005970.975574][SQLGetDiagRec.c][758]
                   Entry:
                            Statement = 0x276ecb0
                            Rec Number = 1
                            SQLState = 0x7fffc3ff2e20
                            Native = 0x7fffc3ff2c14
                            Message Text = 0x7fffc3ff2c20
                            Buffer Length = 510
                            Text Len Ptr = 0x7fffc3ff2e70
    [ODBC][11041][1429005970.975615][SQLGetDiagRec.c][795]
                    Exit:[SQL_SUCCESS]
                            SQLState = 07006
                            Native = 0x7fffc3ff2c14 -> -11013
                            Message Text = [[Informix][Informix ODBC Driver]Restricted data type attribute violation.]
    [ODBC][11041][1429005970.975642][SQLGetDiagRec.c][758]
                    Entry:
                            Statement = 0x276ecb0
                            Rec Number = 2
                            SQLState = 0x7fffc3ff2e20
                            Native = 0x7fffc3ff2c14
                            Message Text = 0x7fffc3ff2c20
                         Message Text = 0x7fffc3ff2c20
                            Buffer Length = 510
                            Text Len Ptr = 0x7fffc3ff2e70
    [ODBC][11041][1429005970.975667][SQLGetDiagRec.c][795]
                    Exit:[SQL_NO_DATA]

    Here are my findings after consulting the unixODBC mailing list and the IBM documentation.
    There are several levels of data types at play here: native Informix SQL types, Informix ODBC driver SQL types and Informix ODBC driver C types (as well as standard C types).
    According to the Informix documentation (http://www-01.ibm.com/support/knowledgecenter/SSGU8G_11.70.0/com.ibm.odbc.doc/ids_odbc_108.htm), the ODBC driver SQL type for the native boolean type is SQL_BIT.
    The traces show that the ODBC SQL type is SQL_BIT (type code -7) and that this should be converted into the SQL_C_UTINYINT ODBC C type (type code -28).
    Oracle ODBC Gateway trace:
    DTY    NULL-OK  LEN  MAXBUFLEN  PR/SC  CST IND MOD NAME
    -7 BIT Y          1          1  0/  0    0  0  20 stat
    Performing delayed open.
    SQLBindCol: column 1, cdatatype: -28, bflsz: 1
    unixODBC trace:
    ODBC][11041][1429005970.975326][SQLBindCol.c][236]
                    Entry:
                            Statement = 0x276ecb0
                            Column Number = 1
                           Target Type = -28 SQL_C_UTINYINT
                            Target Value = 0x27f5af8
                            Buffer Length = 1
                            StrLen Or Ind = 0x27f5eb8
    [ODBC][11041][1429005970.975349][SQLBindCol.c][341]
    Oracle tries to bind the SQL_BIT type column to a buffer of SQL_C_UTINYINT type, which requires a conversion from SQL_BIT to SQL_C_UTINYINT  that is apparently not supported by the Informix ODBC Driver.
    According to the documentation (http://www-01.ibm.com/support/knowledgecenter/SSGU8G_11.70.0/com.ibm.odbc.doc/ids_odbc_108.htm) the Informix ODBC driver can only convert the SQL_BIT ODBC SQL type into SQL_C_BINARY, SQL_C_BIT and SQL_C_CHAR ODBC C types. (The ODBC C types are in turn converted into standard C types, for example the SQL_C_BIT type is converted into UCHAR which is a typedef for the standard C type unsigned char.)
    A possible workaround could be to tell Informix to present boolean as a different ODBC SQL type, for example SQL_CHAR (as it would be possible with PostgreSQL by setting BoolAsCharater=1 in odbc.ini), but Informix only seems to supports the SQL_BIT ODBC SQL type.
    A cumbersome workaround is to use the Gateway's pass-through feature that allows a query to be passed to Informix as is, which in turn allows us to cast the boolean field into a character field:
    SQL> set serveroutput on
    SQL> r
      1  DECLARE
      2    val  VARCHAR2(1);
      3    c    INTEGER;
      4    nr  INTEGER;
      5  BEGIN
      6    c := DBMS_HS_PASSTHROUGH.OPEN_CURSOR@informix;
      7    DBMS_HS_PASSTHROUGH.PARSE@informix(c,'select cast (stat as character) from bt');
      8    LOOP
      9    nr := DBMS_HS_PASSTHROUGH.FETCH_ROW@informix(c);
    10    EXIT WHEN nr = 0;
    11    DBMS_HS_PASSTHROUGH.GET_VALUE@informix(c, 1, val);
    12    DBMS_OUTPUT.PUT_LINE(val);
    13    END LOOP;
    14    DBMS_HS_PASSTHROUGH.CLOSE_CURSOR@informix(c);
    15  END;
    16*
    t
    f
    PL/SQL procedure successfully completed
    Easier solutions are still welcome.

  • An expression of non-boolean type specified in a context where a condition is expected, near ','

    I am getting the error message, "An expression of non-boolean type specified in a context where a condition is expected, near ',' " when running an ssrs 2008 r2 report.
    The sql embedded in the dataset is:
    IF @reportID <> 0
    BEGIN
      SELECT 'Students report 1' AS selectRptName, 1 AS rptNumValue
      UNION
      SELECT 'Students report 2', 2 
      UNION
      SELECT 'Students report 3', 3
      UNION
      SELECT 'Students report 4', 4
      UNION
      SELECT 'Students report 5', 5
      ORDER BY selectRptName
    END
    The sql runs fine in managment studio when I declare @reportID.
    The sql runs fine with I comment out  'IF @reportID <> 0'.
    The @reportID is a parmeter value that is passed to the applicable dataset.
    The @reportID can have more than one value.
    Thus can you show me sql and/or tell me what I need to do to solve the issue for me?

    Hi wendy,
    After testing the issue in my environment, I can reproduce it when I select more than one values in the @reportID parameter drop-down list. As per my understanding, it seems that you are trying to filter the dataset with the @reportID parameter. When it
    doesn’t contain value ‘0’, the dataset returns values. Otherwise, no value is returned in the dataset.
    If in this scenario, we can achieve this requirement with filters in the dataset. For more details, please refer to the following steps:
    Modify the dataset with the below query:
    SELECT 'Students report 1' AS selectRptName, 1 AS rptNumValue
    UNION
    SELECT 'Students report 2', 2 
    UNION
    SELECT 'Students report 3', 3
    UNION
    SELECT 'Students report 4', 4 
    UNION
    SELECT 'Students report 5', 5
    ORDER BY selectRptName
    Click the Filters in the left pane of Dataset Properties dialog box.
    Add a filter as below:
    Expression: =INSTR(JOIN(Parameters!reportID.Value,","),"0")>0
    Type: Boolean
    Operator: =
    Value: false
    The following screenshot is for your reference:
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • An expression of non boolean type specified in context near id

    Hi
    Sorry for duplicate posting. I am desperately looking to solve the issue for  display image tif format using datawindow inkpict. I am little bit going progress .
    My Sqlserver  table  <mpdoc>
    id <int>, empdoc  <image>
    In datawindow object I have given id as id and large binary column as empdoc. But after when I retrieve the datawindow it is showing the error
    'an expression of non Boolean type specified in context near id' how can I fix this error.Please help
    dw_1.settransobject(sqlca)
    dw_1.retrieve()
    I am very desperate at the moment with the powerbuilder to display tif image   and also I can only get the help from this site.
    if it is not working in PB, I have to use C#.
    With Many Thanks
    Pol

    Hi wendy,
    After testing the issue in my environment, I can reproduce it when I select more than one values in the @reportID parameter drop-down list. As per my understanding, it seems that you are trying to filter the dataset with the @reportID parameter. When it
    doesn’t contain value ‘0’, the dataset returns values. Otherwise, no value is returned in the dataset.
    If in this scenario, we can achieve this requirement with filters in the dataset. For more details, please refer to the following steps:
    Modify the dataset with the below query:
    SELECT 'Students report 1' AS selectRptName, 1 AS rptNumValue
    UNION
    SELECT 'Students report 2', 2 
    UNION
    SELECT 'Students report 3', 3
    UNION
    SELECT 'Students report 4', 4 
    UNION
    SELECT 'Students report 5', 5
    ORDER BY selectRptName
    Click the Filters in the left pane of Dataset Properties dialog box.
    Add a filter as below:
    Expression: =INSTR(JOIN(Parameters!reportID.Value,","),"0")>0
    Type: Boolean
    Operator: =
    Value: false
    The following screenshot is for your reference:
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Hi i want to use boolean type in a procedure as out parameter !!

    Hi
    I need to use Boolean type as out parameter in my procedure which return true if the SELECT query in procedure returns any row otherwise it should return false
    please HELP !!

    I need to use Boolean type as out parameter in my procedure which return true if the SELECT query in procedure returns any row otherwise it should return false
    Sounds like basic PL/SQL stuff.
    What problem are you experiencing?
    Are you looking for something like this?
    create or replace procedure check_emp (p_empno in number, p_result out boolean) is
      dummy  pls_integer;
    begin
      select 1
      into dummy
      from scott.emp
      where empno = p_empno;
      p_result := true;
    exception
      when no_data_found then
        p_result := false;
    end;
    SQL> declare
      2    emp_exists  boolean;
      3  begin
      4    check_emp(7839, emp_exists);
      5    if emp_exists then
      6      dbms_output.put_line('Employee exists');
      7    else
      8      dbms_output.put_line('Employee does not exist');
      9    end if;
    10  end;
    11  /
    Employee exists
    PL/SQL procedure successfully completed

  • What is the default value of boolean type transient attribute in VO?

    Hi All,.
    jdev version-11.1.2.1.0
    i have created one vo based on eo where i add one boolean type transient attribute Marked(uihint checkbox).
    now i have apply view criteria on this vo.
    like---
         ViewObject vo=getView(iterator);
         vo.setQueryMode(ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);
         ViewCriteria vc=vo.createViewCriteria();
         ViewCriteriaRow vcr=vc.createViewCriteriaRow();
         vcr.setAttribute("Marked", "true");//Setting attribute on view criteria.
           vcr.setConjunction(ViewCriteriaRow.VCROW_CONJ_AND);
           vc.setCriteriaMode(ViewCriteria.CRITERIA_MODE_CACHE);
         vo.applyViewCriteria(vc);//Apply view criteria on vo.
         vo.executeQuery();
         vc.add(vcr);
       vo.executeQuery();this code running fine and that is selected only those row which i have cheked.
    but now i want to apply view criteria that select select those rows that are not checked.
    like-
    vcr.setAttribute("Marked", "false");but it is not return any row.
    if select checked any row and then uncheked that row so marked attribute for this row set false. but rows that are unchecked by default not return.
    so my question is that what is default value of Marked attribute when user not take any action i will try
    vcr.setAttribute("Marked","null");
    but not working.

    i have tried this but this is not working.
    follwing code working for Null case not for False
    vcr.setAttribute("Marked","is null"); this code display all rows who has null but when i checked any row and then unchecked so that row get value "false" also not display.

  • Method fprint(String) is undefined for the type JspWriter.

    please help me with this problem
    below is the jsp code written to access the data from the database and to display it in the new page.
    <%@ page
         import = "java.io.*"
         import = "java.lang.*"
         import = "java.sql.*"
    %>
    <%
         Connection dbconn=null;
         ResultSet results;
         PreparedStatement sql=null;     
                   String empid1=request.getParameter("empids");     
              try
    String driver = "com.mysql.jdbc.Driver";
              Class.forName(driver).newInstance();
                   dbconn =DriverManager.getConnection("jdbc:mysql://localhost/hris","root","redhat");
                   int empid11;
                   empid11=Integer.parseInt(empid1);
                   sql = dbconn.prepareStatement("select * from employee where empid=?");
                   sql.setInt(1,empid11);
                   results=sql.executeQuery();
                   results.next();
    out.print("<html>");
    out.print("<head>");
    out.print("</head>");
    out.print("<body>");
    out.print("<table width=810 border=0>");
    out.print("<tr>");
    out.print("<td width=210>");
    out.print("Employee Id");
    out.print("</td>");
    out.print("<td width=584>");
    int emp=results.getInt("empid");
    out.print(emp);
    out.print("</td>");
    out.print("</tr>");
    out.print("<tr>");
    out.print("<td>");
    out.print("FirstName");
    out.print("</td>");
    out.print("<td>");
    String first=results.getString("fname");
    out.print(first);
    out.print("</td>");
    out.fprint("</tr>");
              catch (SQLException s)
                   out.println("SQL Error <br>"+s);
    catch ( Exception x )
                   x.printStackTrace();
    %>
    but when i click the submit button , the error is
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 9 in the jsp file: /HRIS/empsearch1.jsp
    Generated servlet error:
    The method fprint(String) is undefined for the type JspWriter
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 9 in the jsp file: /HRIS/empsearch1.jsp
    Generated servlet error:
    The method fprint(String) is undefined for the type JspWriter
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:409)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.15 logs.
    i am not able to rectify the error.

    JavaB wrote:
    Hi ,
    I have a method defined in my dataManagerDAO classIs it dataManagerDAO or DataManagerDAO?
    getNoc( strRppsId) throws Exception {}That's not a legal Java method declaration, so it's clearly not your actual declaration, so I have no idea what your actual declaration is, so I can't tell you what you're doing wrong.
    Now I am calling this method inside my JSP page :
    DataManagerDAO dataMgr = new DataManagerDAO();
    dataMgr.getNoc(strRppsId)..
    But whenver I am running it locally , it fails to compile and gives following error msg :
    The method getNoc(String) is undefined for the type DataManagerDAOQuite obviously you're calling a method getNoc(String) but that method doesn't exist on the DataManagerDAO class. No matter how much you may think you know that it does, you're wrong and the compiler is right.
    Maybe you misspelled or mis-capitalized something. Maybe you're passing the wrong type of argument. Maybe you're still using an older version of the DataManagerDAO class from before you added that method. Not enough information here to say for sure.
    ny clue wats going wrong in here ?I assume you mean "any", not "ny" and "what's", not "wats". Clear, correct, precise communication counts with folks here almost as much as it does with the Java compiler.

  • [Access 2010] Change default formats for data types

    Whenever I import data, the default format for Boolean data types is "-1,0." I know how to subsequently change this format to "Yes/No," but I'd like to change the default
    setting to "Yes/No." Is this possible?
    Thanks in advance.

    Hi,
    I found you post the same question in other place and got the advice. I agree with Mr. Kees suggestion. The data type is a build-in default setting with Access, we can't change it. We may try the workaround via VBA to test.
    http://forums.cnet.com/7723-6129_102-627633/access-2010-change-default-formats-for-data-types/#message5617496
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    Have a good time.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

Maybe you are looking for

  • Is there a view that looks like Outlook Today?

    Hi, I'm looking for a view on ical that shows events as a list, sort of like Outlook's Outlook Today view. Here's an example: http://farm4.static.flickr.com/3160/2455654848_0e2ba49d64.jpg Any ideas on this?

  • How to change code in SAP Query

    Hi Experts !! In SAP QUERY I am getting the  PO  with  all delivey dates & deliveried Qty  but I have to select only  single PO with latest delivery date  & qty. If there r more than one record for latest delivery date than deliveried QTY must be sum

  • Is my Valet M20 compatible with Windows 8.1 - Need to move it from One Laptop to Another

    I currently have my Valet on my old Dell Laptop running Windows 7.  The Dell is ready to crash. I tried to load the Cisco M20 on my laptop running Windows 8 with the Key it seemed fine. I rebooted the laptop now it can't seem to find the software. I

  • Session and JSession ID

    After a session has been invalidated using Session.invalidate() method, the next time a user logs in to the application within the same browser session and the servlet (as JSP) attempts to access a session variable; the session variable is no longer

  • Looking for a Projector

    Hi, anyone with a recommendation for a projector to mirror my 17" MBP's Desktop at 1680 X 1050? I need it for software training, and it has to be portable. Maybe in a room with as many as 20 or so, each at their own Mac. I started looking into this a