Problem in using BLOB and callablestatement

Hi
I am doing an insert into the database , of which one of the clomn is
BLOB
when i do it using prepared statement , it does it fine
but if i do it using the callable statment (Stored procedure)its not
doing it .....
and gives an error like below
does anybod know what the problem is
java.sql.SQLException: ORA-06550: line 1, column 9:
PLS-00306: wrong number or types of arguments in call to 'IN
SERT_EVENT_LOG'
ORA-06550: line 1, column 9:
PL/SQL: Statement ignored
at weblogic.db.oci.OciCursor.getCDAException(OciCurs
or.java:228)
at weblogic.jdbcbase.oci.Statement.executeUpdate(Sta
tement.java:869)
at weblogic.jdbc20.pool.PreparedStatement.executeUpd
ate(PreparedStatement.java:47)
at weblogic.jdbc20.rmi.internal.PreparedStatementImp
l.executeUpdate(PreparedStatementImpl.java:54)
at weblogic.jdbc20.rmi.SerialPreparedStatement.execu
teUpdate(SerialPreparedStatement.java:55)
at com.expertcommerce.core.log.DatabaseLogService.in
ternalLog(DatabaseLogService.java:73)
at com.expertcommerce.core.log.BaseLogService.log(Ba
seLogService.java:33)
at com.expertcommerce.core.log.biz.ServerLogAdapter.
log(ServerLogAdapter.java:113)
at com.expertcommerce.core.log.biz.ServerLogAdapter.
logError(ServerLogAdapter.java:135)
at com.expertcommerce.core.users.biz.UserEntityBean.
ejbFindByPrimaryKey(UserEntityBean.java:409)
at com.expertcommerce.core.users.biz.UserEntityBeanH
omeImpl.findByPrimaryKey(UserEntityBeanHomeImpl.java:81)
at com.expertcommerce.core.users.biz.UserEntityBeanH
omeImpl.findByPrimaryKey(UserEntityBeanHomeImpl.java:49)
at weblogic.ejb.internal.EJBHomeImpl.remove(EJBHomeI
mpl.java:297)
at com.expertcommerce.core.users.biz.UserEntityBeanH
omeImpl_ServiceStub.remove(UserEntityBeanHomeImpl_ServiceStu
b.java:378)
at com.expertcommerce.core.users.biz.UserManagerSess
ionBean.removeUser(UserManagerSessionBean.java:172)
at com.expertcommerce.core.users.biz.UserManagerSess
ionBean.handle(UserManagerSessionBean.java:47)
at com.expertcommerce.core.users.biz.UserManagerSess
ionBeanEOImpl.handle(UserManagerSessionBeanEOImpl.java:146)
at com.expertcommerce.core.users.biz.UserManagerSess
ionBeanEOImpl_ServiceStub.handle(UserManagerSessionBeanEOImp
l_ServiceStub.java:255)
at com.expertcommerce.core.event.CoreEventDispatcher
.dispatch(CoreEventDispatcher.java:17)
at com.expertcommerce.core.event.biz.CoreEventDispat
cherSessionBean.dispatch(CoreEventDispatcherSessionBean.java
:24)
at com.expertcommerce.core.event.biz.CoreEventDispat
cherSessionBeanEOImpl.dispatch(CoreEventDispatcherSessionBea
nEOImpl.java:105)
at com.expertcommerce.core.event.biz.CoreEventDispat
cherSessionBeanEOImpl_WLSkel.invoke(CoreEventDispatcherSessi
onBeanEOImpl_WLSkel.java:159)
at weblogic.rmi.extensions.BasicServerObjectAdapter.
invoke(BasicServerObjectAdapter.java:338)
at weblogic.rmi.extensions.BasicRequestHandler.handl
eRequest(BasicRequestHandler.java:69)
at weblogic.rmi.internal.BasicExecuteRequest.execute
(BasicExecuteRequest.java:15)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.j
ava:120)
com.expertcommerce.core.log.LogServiceException: ORA-06550:
line 1, column 9:
PLS-00306: wrong number or types of arguments in call to 'IN
SERT_EVENT_LOG'
ORA-06550: line 1, column 9:
PL/SQL: Statement ignored
at com.expertcommerce.core.log.DatabaseLogService.in
ternalLog(DatabaseLogService.java:111)
at com.expertcommerce.core.log.BaseLogService.log(Ba
seLogService.java:33)
at com.expertcommerce.core.log.biz.ServerLogAdapter.
log(ServerLogAdapter.java:113)
at com.expertcommerce.core.log.biz.ServerLogAdapter.
logError(ServerLogAdapter.java:135)
at com.expertcommerce.core.users.biz.UserEntityBean.
ejbFindByPrimaryKey(UserEntityBean.java:409)
at com.expertcommerce.core.users.biz.UserEntityBeanH
omeImpl.findByPrimaryKey(UserEntityBeanHomeImpl.java:81)
at com.expertcommerce.core.users.biz.UserEntityBeanH
omeImpl.findByPrimaryKey(UserEntityBeanHomeImpl.java:49)
at weblogic.ejb.internal.EJBHomeImpl.remove(EJBHomeI
mpl.java:297)
at com.expertcommerce.core.users.biz.UserEntityBeanH
omeImpl_ServiceStub.remove(UserEntityBeanHomeImpl_ServiceStu
b.java:378)
at com.expertcommerce.core.users.biz.UserManagerSess
ionBean.removeUser(UserManagerSessionBean.java:172)
at com.expertcommerce.core.users.biz.UserManagerSess
ionBean.handle(UserManagerSessionBean.java:47)
at com.expertcommerce.core.users.biz.UserManagerSess
ionBeanEOImpl.handle(UserManagerSessionBeanEOImpl.java:146)
at com.expertcommerce.core.users.biz.UserManagerSess
ionBeanEOImpl_ServiceStub.handle(UserManagerSessionBeanEOImp
l_ServiceStub.java:255)
at com.expertcommerce.core.event.CoreEventDispatcher
.dispatch(CoreEventDispatcher.java:17)
at com.expertcommerce.core.event.biz.CoreEventDispat
cherSessionBean.dispatch(CoreEventDispatcherSessionBean.java
:24)
at com.expertcommerce.core.event.biz.CoreEventDispat
cherSessionBeanEOImpl.dispatch(CoreEventDispatcherSessionBea
nEOImpl.java:105)
at com.expertcommerce.core.event.biz.CoreEventDispat
cherSessionBeanEOImpl_WLSkel.invoke(CoreEventDispatcherSessi
onBeanEOImpl_WLSkel.java:159)
at weblogic.rmi.extensions.BasicServerObjectAdapter.
invoke(BasicServerObjectAdapter.java:338)
at weblogic.rmi.extensions.BasicRequestHandler.handl
eRequest(BasicRequestHandler.java:69)
at weblogic.rmi.internal.BasicExecuteRequest.execute
(BasicExecuteRequest.java:15)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.j
ava:120)
with parameter
exitsfalse
Retuening result to CoreEventcom.expertcommerce.core.users.e
vents.RemoveUserEvent@6dcc33
Stored Procedure .....
CREATE or replace procedure insert_Event_Log
pEvent_ID in out number,
pEvent_Severity in number,
pEvent_Data in blob,
pEvent_Action in number,
pEvent_Time in date,
pEvent_Source in char,
pEvent_Status in char,
pEvent_User in char,
pEvent_Subject in char,
pEvent_Subject_ID in char
AS
tEvent_ID number;
BEGIN
/* Get the sequence key */
if (pEvent_ID is null ) then
select event_id_seq.nextval into tEvent_ID from dual;
insert into Event_ID (pkey, justabit) values ( tEvent_ID, 1);
end if;
/* Insert the values in the table */
INSERT INTO Event_Log
Event_ID,
Event_Severity,
Event_Data,
Event_Action,
Event_Time,
Event_Source,
Event_Status,
Event_User,
Event_Subject,
Event_Subject_ID
VALUES (
tEvent_ID,
pEvent_Severity,
pEvent_Data,
pEvent_Action,
pEvent_Time,
pEvent_Source,
pEvent_Status,
pEvent_User,
pEvent_Subject,
pEvent_Subject_ID
pEvent_ID := tEvent_ID;
END;
My TEst Program
import java.sql.*;
import java.util.Properties;
import oracle.jdbc.driver.*;
import oracle.sql.*;
class rfxtest{
public static void main(String[] args){
rfxtest test = new rfxtest();
CallableStatement m_stmt = null;
PreparedStatement pStmt = null;
String rfxdata = "this is the test data for the event-blob-test";
try{
Connection con = test.getConnection();
String temp = "call insert_event_log ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
m_stmt = con.prepareCall(temp);
m_stmt.setNull(1, java.sql.Types.INTEGER);
m_stmt.setInt(2, 123);
m_stmt.setBytes(3, (byte[])rfxdata.getBytes());
m_stmt.setInt(4, 123);
m_stmt.setTimestamp(5, new java.sql.Timestamp(System.currentTimeMillis()));
m_stmt.setString(6, "xxxxxxxxxx");
m_stmt.setString(7, "xxxxxxxxxx");
m_stmt.setString(8, "xxxxxxxxxx");
m_stmt.setString(9, "xxxxxxxxxx");
m_stmt.setString(10, "xxxxxxxxxx");
m_stmt.executeUpdate();
String selectStmt = " select event_data from event_log where event_id = 12345" ;
pStmt = con.prepareStatement(selectStmt);
ResultSet rs = pStmt.executeQuery();
if(!rs.next()){
System.out.println("error");
} else {
Blob b = rs.getBlob(1);
byte[] blob = (byte[])b.getBytes(1,(int)b.length());
String s = new String(blob);
System.out.println("The blob content is : "+s);
}catch(Exception e){
e.printStackTrace();
public Connection getConnection(){
try{
Properties props = new Properties();
props.put("user", "nexgen");
props.put("password", "nexgen");
Driver myDriver = (Driver) new oracle.jdbc.driver.OracleDriver();
Connection conn =
myDriver.connect("jdbc:oracle:thin:@192.168.254.6:1521:ecw",props);
return conn;
catch(Exception e){
e.printStackTrace();
return null;
appreciate response
venki
null

Navid,
JHeadstart checks whether the attribute definition is queryable before adding it to the list of advanced search attributes. A transient VO attribute can still be set to queryable, for a transient EO attribute this is not possible. We will remove this check on queryability in the upcoming patch release, since you have a valid use case. For now, you can subclass JhsSearchBean and override method createArgumentListForAdvancedSearch and comment out the check for "def.isQueryable()".
Steven Davelaar,
JHeadstart Team.

Similar Messages

  • I have two Iphones with different email addresses sharing one Apple ID. Will that cause problems with using messaging and FaceTime?

    I have two Iphones 5 with different email addresses sharing one Apple ID account.Both are using IOS 8.
    I would like to set up a new Apple Id for one of the phones and remove it from the old account.
    If I do that, can I move all of the purchased apps and songs to the new Apple account?
    Also, will sharing one Apple ID account with two devices cause problems with using messaging and FaceTime?

    Sharing an iCloud account between two devices can be done without causing issues with iMessage and FaceTime, just go into Settings for each of these functions and designate separate points of contact (i.e. phone number only, or phone number and unique email address).  While that works, you'll then face the problem where a phone call to one iPhone will ring both if on the same Wi-Fi network -- but again, that can be avoided by changing each phone's settings.
    Rather than do all that, don't fight it -- use separate IDs for iCloud.  You can still use a common ID for iTunes purchases (the ID for purchases and iCloud do not have to be the same) or you can use Family Sharing to share purchases from a primary Apple account.

  • Database Procedure Calling by Using PreparedStatement and CallableStatement

    Hi
    We can execute Database Stored Procedure by using PreparedStatement and CallableStatement as well.Then what is the significance of having CallableStatement.
    Please let me know the difference between these two Statement objects particularly in Stored Procedures Execution.
    Thanks in advance
    Basha007

    A callable statement excecutes a stored procedure that's stored and run on the database server.
    A prepared statement doesn't require a database stored procedure. It's parsed and cached by the JDBC driver, and allows you to specify parameters and bind values to them at runtime. Those are usually used in loop constructs where you want to repeatedly execute the same SQL with different values.
    Not all RDBMS support stored procedures (e.g., MySQL), but every driver I've used allows PreparedStatements. - MOD

  • CL_GUI_ALV_GRID Problems when using enter and f4 in one ALV

    Hi guys,
    i have the following problem:
    I Use a ALV, which has a column MATNR. The ALV provides the standard search help for this field automatically. so far so good. BUT i also need to read additional data, such as GLD, Material shortext etc, when the users presses the Enter Key.
    Here is my coding:
          CLASS lcl_events DEFINITION
    CLASS lcl_events_0300 DEFINITION.
      PUBLIC SECTION.
        METHODS:
          handle_data_changed
                FOR EVENT data_changed OF  cl_gui_alv_grid
                IMPORTING er_data_changed sender.
    ENDCLASS.                    "lcl_events DEFINITION
    The problem that occurs: if i select a material via f4, i just can add one material to the alv. if i place the cursor into the second line, press f4 again, the alv overwrites the MATNR in the first line
    i think the problem has to do with the fact, that the alv runs throug my enter event, when pressing f4.
    thats how i registered my event:
      g_o_alv_grid_bart_0300->register_edit_event(
      EXPORTING
       " i_event_id = g_o_alv_grid->MC_EVT_MODIFIED ).
         i_event_id = g_o_alv_grid->mc_evt_enter ).
    ...und EventHandler zuweisen
      CREATE OBJECT g_o_alv_events_0300.
      SET HANDLER g_o_alv_events_0300->handle_data_changed FOR g_o_alv_grid_bart_0300.
    kind regards, mark
    Edited by: Mark Wagener on Aug 19, 2010 11:39 AM
    Edited by: Mark Wagener on Aug 19, 2010 11:40 AM

    Sorry for forgetting the impl. part of the class!
          CLASS lcl_events_0300 IMPLEMENTATION
    CLASS lcl_events_0300 IMPLEMENTATION.
      METHOD handle_data_changed.
    HandleDataChanged                  ***
        DATA: ls_good                TYPE lvc_s_modi.
         FIELD-SYMBOLS: .
    alle Inhalte der geänderten Zellen in die interne Tabelle schreiben
        LOOP AT er_data_changed->mt_good_cells INTO ls_good.
    Dazu auf die richtige Zeile in der ITAB positionieren:
          READ TABLE  INDEX ls_good-row_id.
          IF sy-subrc = 0.
    Und das geänderte Feld dem Feldsymbol zuweisen
            ASSIGN COMPONENT ls_good-fieldname OF STRUCTURE .
            IF sy-subrc = 0.
    Feldwert zuweisen
              -matnr
            AND bwkey = werks.
      ENDLOOP.
    Und neu ausgeben
        g_o_alv_grid_bart_0300->refresh_table_display( ).
      ENDMETHOD.                    "handle_data_changed

  • Problems printing using iPhoto and Epson Stylus Photo R2400

    I'm using OS 10.5.6 and iPhoto 8.0.2(402) to print pictures on my Epson Stylus Photo R2400.
    I have other printers set up on this computer and they all print everything just fine regardless of the program I am using.
    Using the Epson Stylus, I'm able to print from any other program than iPhoto.
    When I try to print pictures from iPhoto, I get the error message...
    can't open ` /private/var/spool/cups/tmp/4a18c65407c9b (the numbers at the end changes each time I try to print.
    When I go in to check the folders out to see what might be causing the problem, the permissions on the folder cups and tmp have the following rights set up. system = Read & Write, _lp = No Access, everyone = No Access.
    I've been able to set the everyone setting to equal Read & Write access, but I can't get the _lp access to change. When I reboot the computer, the everyone setting goes back to No Access.
    Any ideas for how I can get this to work?
    Thanks,
    Bill

    Welcome to the Apple Discussions. I don't have a tried and true fix for that but I would start with dumping the printer driver via the System/Print pane and then reinstall it. Go to the Epson site to download the latest driver for that particular model in case there's a newer one released.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier versions) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. There are versions that are compatible with iPhoto 5, 6, 7 and 8 libraries and Tiger and Leopard. Just put the application in the Dock and click on it whenever you want to backup the dB file. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    NOTE: The new rebuild option in iPhoto 09 (v. 8.0.2), Rebuild the iPhoto Library Database from automatic backup" makes this tip obsolete.

  • Problems when using outlook and outlook express, cannot send more than app 100 KB.

    Since app 6 weeks ago we have problems when sending pictures etc, we cannot send more than app 100KB. If we send more there is error code
      Socket Error 10053, Error number 0x800CCC0F. Your server has unexpectedly terminated the connection.
    I have made no changes to either computer. Restoring the laptop to Nov 2011 made no difference.We use Outlook Exlorer and Outlook.
    When I take my laptop to my neighbors house, who has Time Warner, I can send 10MB files without any problems, using the EXACT same settings.
    Spending over 2 hours with a very informed Verizon technician on the phone did nothing.
    I first blamed our server, turns out the culprit is Verizon. 
    Any ideas?
    Eugene

    Good Morning,
    Are you able to send attachments on webmail.verizon.net?
    Shamika_Vz
    Verizon Support
    Notice: Content posted by Verizon employees is meant to be informational and does not supersede or change the Verizon Forums User Guidelines or Terms or Service, or your Customer Agreement Terms and Conditions or Plan.

  • I have problem with using maps and directions.

    Hi,
    I'm using iPhone 5, I purchased before 1 year from Qatar. I have a problem with maps and direction here, I have attached error message. Please kindly inform me reason.

    The feature(s) you are looking for don't appear to be available in your country.
    See:
    http://www.apple.com/ios/feature-availability/

  • Problem in using AVTransmit2 and AVReceive2

    Hello,
    I am very new to JMF. I start to work on it and i teke sample example from http://java.sun.com/products/java-media/jmf/2.1.1/solutions/AVTransmit.html and http://java.sun.com/products/java-media/jmf/2.1.1/solutions/AVReceive.html.
    In AVTransmit i pass parameter as AVTransmit2 file://F://Songs//MalgudiDays.mp3 192.168.19.51 42050
    at receiving side AVReceive2 192.168.19.51/42050 192.168.19.29/42506.
    Here 192.168.19.29 is sender and 192.168.19.51 is receiver.
    I check that all used ports are free.
    here is my output :
    AVTransmit2.java Side
    Track 0 is set to transmit as:
    mpegaudio/rtp, 44100.0 Hz, 16-bit, Stereo, LittleEndian, Signed, 16000.0 frame rate, FrameSize=32768 bits
    Created RTP session: 192.168.19.51 42050
    Start transmission for 60 seconds...
    ...transmission ended.
    Process completed.
    AVReceive2.java Side
    - Open RTP session for: addr: 192.168.19.51 port: 42050 ttl: 1
    - Open RTP session for: addr: 192.168.19.29 port: 42506 ttl: 1
    - Waiting for RTP data to arrive...
    - Recevied new RTP stream: mpegaudio/rtp, Unknown Sample Rate
    The sender of this stream had yet to be identified.
    AVReceive2 internal error: javax.media.ControllerErrorEvent[source=com.sun.media.content.unknown.Handler@fa3ac1,message=Internal module com.sun.media.BasicRendererModule@1c39a2d: failed to handle a data format change!]
    Exiting AVReceive2
    Process completed.
    Please Can anyone guide me to identify my mistake.
    Thank you in advance.

    Navid,
    JHeadstart checks whether the attribute definition is queryable before adding it to the list of advanced search attributes. A transient VO attribute can still be set to queryable, for a transient EO attribute this is not possible. We will remove this check on queryability in the upcoming patch release, since you have a valid use case. For now, you can subclass JhsSearchBean and override method createArgumentListForAdvancedSearch and comment out the check for "def.isQueryable()".
    Steven Davelaar,
    JHeadstart Team.

  • Another problem with using canvases and scrollviewers in tab

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Data;
    using System.Windows.Documents;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Media.Imaging;
    using System.Windows.Navigation;
    using System.Windows.Shapes;
    namespace WPFDynamicTab
        /// <summary>
        /// Interaction logic for MainWindow.xaml
        /// </summary>
        public partial class MainWindow : Window
            private List<TabItem> _tabItems;
            private TabItem _tabAdd;
       //     private Canvas canvas1;
            public MainWindow()
               try
                    InitializeComponent();
                    // initialize tabItem array
                    _tabItems = new List<TabItem>();
                    // add a tabItem with + in header
                    _tabAdd = new TabItem();
                 //    canvas1= new Canvas();
                    _tabAdd.Header = "+";
                    _tabAdd.MouseLeftButtonUp += _tabAdd_MouseLeftButtonUp;
                    _tabItems.Add(_tabAdd);
                    this.AddTabItem();   // add first tab
                    // bind tab control
                    tabDynamic.DataContext = _tabItems;
                    tabDynamic.SelectedIndex = 0;
                catch (Exception ex)
                    MessageBox.Show(ex.Message);
            private TabItem AddTabItem()
                int count = _tabItems.Count;
                // create new tab item
                TabItem tab = new TabItem();
                tab.Header = string.Format("Tab {0}", count);
                tab.Name = string.Format("tab{0}", count);
                tab.HeaderTemplate = tabDynamic.FindResource("TabHeader") as DataTemplate;
                // add controls to tab item, this case I added just a canvas
                ScrollViewer scrollview1 = new ScrollViewer();
                Canvas canvas1 = new Canvas();
                canvas1.Name = "canvas1";
    // XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                Canvas_Paint(ref canvas1); // Canvas_Paint defines the background color of  "canvas1"
                scrollview1.Height=200;
                scrollview1.VerticalAlignment = VerticalAlignment.Center;
                canvas1.Height=400+400*count;
                scrollview1.Content = canvas1;
                tab.Content = scrollview1;    
    //YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY 
                // insert tab item right before the last (+) tab item
                _tabItems.Insert(count - 1, tab);
                return tab;
            private void _tabAdd_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
                TabItem newTab = this.AddTabItem();
                // clear tab control binding
                tabDynamic.DataContext = null;
                // bind tab control
                tabDynamic.DataContext = _tabItems;
                tabDynamic.SelectedItem = newTab;
            private void Canvas_Paint(ref Canvas canvas1)
                int count = _tabItems.Count;
                switch (count)
                    case 0:
                        canvas1.Background = Brushes.Green;
                        break;
                    case 1:
                        canvas1.Background = Brushes.Red;
                        break;
                    case 2:
                        canvas1.Background = Brushes.Blue;
                        break;
                    case 3:
                        canvas1.Background = Brushes.Yellow;
                        break;
                    case 4:
                        canvas1.Background = Brushes.Brown;
                        break;
                    case 5:
                        canvas1.Background = Brushes.Orange;
                        break;
                    case 6:
                        canvas1.Background = Brushes.Olive;
                        break;
                    default:
                        break;
            private void tabDynamic_SelectionChanged(object sender, SelectionChangedEventArgs e)
          // this is a dummy method
     and the xaml
    <Window x:Class="WPFDynamicTab.MainWindow"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            Title="Dynamic Tab" Height="300" Width="527" WindowStartupLocation="CenterScreen">
        <Grid>
            <TabControl Name="tabDynamic" ItemsSource="{Binding}" SelectionChanged="tabDynamic_SelectionChanged">
                <TabControl.Resources>
                    <DataTemplate x:Key="TabHeader" DataType="TabItem">
                        <DockPanel>
                            <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=TabItem }, Path=Header}" />
                        </DockPanel>
                    </DataTemplate>
                </TabControl.Resources>
            </TabControl>
        </Grid>
    </Window>
    The program does the job but there are 2 questions. I am using a scrollviewer and each time the tab increases the canvas size increases and this is reflected in the scrollview bar getting shorter.
    Question 1)
    I set the scrollview1 height to  200 ,which was obtained by trial and error, increasing causes the extents to go outside the box etc,
    the window height was 300 , is it possible to automatically set the scrollviewer height.
    Question 2)
    Is it possible to  put the canvas and scrollviewer into the XAML I tried but  failed
    Note: the relevent code to the above questeions is between XXXXX... and YYYY...

    >>the window height was 300 , is it possible to automatically set the scrollviewer height.
    You should not specify an explicit height if you want an element to fill the available space. Just set the VerticalAlignment property to Strecth (which is the default value for a ScrollViewer:
    Canvas_Paint(ref canvas1); // Canvas_Paint defines the background color of "canvas1"
    scrollview1.VerticalAlignment = VerticalAlignment.Stretch;
    canvas1.Height = 400 + 400 * count;
    scrollview1.Content = canvas1;
    tab.Content = scrollview1;
    //YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
    // insert tab item right before the last (+) tab item
    _tabItems.Insert(count - 1, tab);
    return tab;
    >>Is it possible to  put the canvas and scrollviewer into the XAML I tried but  failed
    Well, you could define the ScrollViewer, i.e. the root element, as a resource and then add access it from the AddTabItem() method like this:
    <Window x:Class="WPFDynamicTab.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Dynamic Tab" Height="300" Width="527" WindowStartupLocation="CenterScreen">
    <Window.Resources>
    <ScrollViewer x:Key="sv" x:Shared="false">
    <Canvas Height="800">
    </Canvas>
    </ScrollViewer>
    </Window.Resources>
    <Grid>
    <TabControl Name="tabDynamic" ItemsSource="{Binding}" SelectionChanged="tabDynamic_SelectionChanged">
    <TabControl.Resources>
    <DataTemplate x:Key="TabHeader" DataType="TabItem">
    <DockPanel>
    <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=TabItem }, Path=Header}" />
    </DockPanel>
    </DataTemplate>
    </TabControl.Resources>
    </TabControl>
    </Grid>
    </Window>
    private TabItem AddTabItem()
    int count = _tabItems.Count;
    // create new tab item
    TabItem tab = new TabItem();
    tab.Header = string.Format("Tab {0}", count);
    tab.Name = string.Format("tab{0}", count);
    tab.HeaderTemplate = tabDynamic.FindResource("TabHeader") as DataTemplate;
    // add controls to tab item, this case I added just a canvas
    ScrollViewer scrollview1 = this.Resources["sv"] as ScrollViewer;
    Canvas canvas1 = scrollview1.Content as Canvas;
    canvas1.Name = "canvas1";
    Canvas_Paint(ref canvas1); // Canvas_Paint defines the background color of "canvas1"
    scrollview1.VerticalAlignment = VerticalAlignment.Stretch;
    canvas1.Height = 400 + 400 * count;
    scrollview1.Content = canvas1;
    tab.Content = scrollview1;
    // insert tab item right before the last (+) tab item
    _tabItems.Insert(count - 1, tab);
    return tab;
    It may not provide that much benefits in this scenario though since you are setting the height and the background of the Canvas dynamically but it is indeed possible.
    Hope that helps.
    Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question.

  • Problem in using quick and advanced search based on transient items

    Hi everybody
    I want to have an unbound string item in my form and allow users to use advanced search and quick search on that item.
    I read the following post About advanced search and added a transient
    item on view object and overrode the advance search method in application module and realized that the value of that string was
    added to arguments.
    Then I decided to add this transient item on entity object instead of view object so that we were able to add the item in one place and
    use it in several view objects. I added an item in the entity and unchecked the persistent flag but I can't set queryable flag since it was disable.
    I added the item in the view object and by use of application definition I forced the item to be shown in the advance search.
    I generate the application and the item was shown correctly in the advanced search but when I set the item in advanced search its value
    was not sent to advance search method.
    Is it a bug ? (value of the field in the advanced search section was not sent to advanced search method )
    Is it a way to add a queryable transient item in the entity object and still benefit from overriding advanced search method ?
    I am using Jdeveloper 10.1.3 and Jheadstart 10.1.3.
    Any help would be appreciated.
    Best Regards
    Navid

    Navid,
    JHeadstart checks whether the attribute definition is queryable before adding it to the list of advanced search attributes. A transient VO attribute can still be set to queryable, for a transient EO attribute this is not possible. We will remove this check on queryability in the upcoming patch release, since you have a valid use case. For now, you can subclass JhsSearchBean and override method createArgumentListForAdvancedSearch and comment out the check for "def.isQueryable()".
    Steven Davelaar,
    JHeadstart Team.

  • Facing problem when using SYNC and ASYNC bridge in ID

    Hi all,
    In BPM i am using SYNC/ASYNC bridge for that Outbound Interface and BPM Sync Interface has the same structure is it mapping necessary for that intercaces.
    In interface determination it is showing error duplicate interfaces in ID test configuration , when i loading the Interface mapping for the same.
    In the Receiver determination i am sending the message based on the conditions to the particular receives through different receivers Business Systems from the Sync interface showing error.
    Give me solution how should i do the Interface determination and receiver determination.
    Please help me any one .
    Thanks in advance,
    Manohar.
    Edited by: Manohar S on Feb 28, 2008 9:50 AM

    Sorry for delay.
    Tough question.
    Oracle® Database High Availability Best Practices 11g Release 2 (11.2) E10803-01 August 2011
    Under "5.1.8 Set LOG_BUFFER Initialization Parameter to a Minimum 8 MB"
    States :
    "If you are using Oracle Data Guard with asynchronous redo transport, you may need to increase the value of the
    LOG_BUFFER parameter to avoid disk I/Os to online redo logs."
    Nothing about "Synchronous".
    I agree with you on Oracle Support Note 951152.1, its vague.
    Additional links on the subject
    This also seems to imply :
    http://joordsblog.vandenoord.eu/2010/08/data-guard-optimizing-async-redo.html
    So does this ( With ASYNC, increase log buffer size if necessary )
    http://www.oracle.com/technetwork/database/features/availability/316925-175283.pdf
    This one has a very nice Synchronous and Asynchronous compare.
    http://www.datadisk.co.uk/html_docs/oracle_dg/architecture.htm
    New Zealand, Someday I may have to travel there.
    Best Regards
    mseberg

  • Problem scanning using iMac and HP6500a Plus

    Just purchased a HP Officejet6500a Plus as the Lexmark I had was very temperamental and I was constantly un/reinstalling the software.
    Set up the printing fine and also got through the set up of hp eprint and Airprint relatively easily.
    Tried to scan yesterday and I keep getting a message saying the computer is not connected to the printer.
    Any ideas on how to get the scanner to work properly?
    I get the feeling that I wish I never bought the thing but hope there is a solution, otherwise why do Apple market these products if they don't work with Apple products properly???

    What you need to uninstall is the HP software. Look on the disc they sent you or the folder it created on your system for an Uninstall utility. If you don't see and Uninstall Utility then it's safe to put all the HP software in the trash and then empty your trash.
    "I looked in Print and Fax under System Preferences and I have the HP product listed as a Printer and a Fax but no scanner. Are you saying it should also be listed as a scanner or just as the printer?"
    You will need to add the scanner, how you do this is pretty simple. Open the Print & Fax Preference and on the left pane you will see a + - symbol at the bottom of the box on the left. Click the + symbol. Then choose "Add other printer or scanner" and look to see if it sees the device. Then it's a matter of selecting it and adding it. If it doesn't then you will need to start all over from the beginning. If you do need to start over let me know and I'll give some instructions.
    BTW most people run into problems like this when they don't follow Apple's instructions. Going forward when adding a peripheral look for Apple's instructions first.
    Last if your computer is covered by AppleCare (meaning you purchased AppleCare or the system is less than 90 days old) you can call AppleCare and they will be happy to walk you through the correct process. They're closed Sunday but open M-Saturday.  The process should take less than 15 minutes.

  • Problem when using IF and ENDIF in SAPScript

    Hi everyone,
        I'm still new at using sapscript. I want to use IF....ENDIF but i confused how to use it in my sapscript. Here is the logic that i get from my functional designer :
    IF t8jvb03-ceind = 'C' THEN
      <E>JIBCL_N     /* Element JIBCL_N */
        &t8jvb11-jibcl& &t8jv11-cltext&
      IF t8jvb11-jibsa <> '99999' THEN
         <E>JIBSA_N
            &t8jvb11-jibsa& &t8jvb11-satext&
      ENDIF
      <E>COBJT_E
            &t8jvb11-cotype&  &t8jvb11-cobject&    &t8jvb11-fcmamt&     &t8jvb11-fydamt&     &t8jvb11-fidamt&
      <E>JIBCL_E
         Total: &t8jvb11-jibcl&   &t8jvb11-cltext&            &t8jvb11-fcmamt&      &t8jvb11-fydamt&     &t8jvb11-fidamt&
    ELSEIF t8jvb03-ceind = 'O' THEN
        IF t8jvb11-jibsa <> '99999' THEN
          <E>JIBCL_N
              &t8jvb11-jibcl& &t8jv11-cltext&
          <E>JIBSA_N
              &t8jvb11-jibsa&   &t8jvb11-satext&          &t8jvb11-fcmamt&     &t8jvb11-fydamt&     &t8jvb11-fidamt&
        ENDIF
        <E>JIBCL_E
           Total : :  &t8jvb11-jibcl&   &t8jvb11-cltext&     &t8jvb11-fcmamt&     &t8jvb11-fydamt&     &t8jvb11-fidamt&
    ELSEIF t8jvb03-ceind = 'W' THEN
    When i activate this logic, it's said that there is double element written(example JIBCL_N in IF t8jvb03-ceind = 'C' and in ELSEIF t8jvb03-ceind = 'O' THEN). Is this ok ? or is there any better way to do this ? For your information i copy the form from standard form ''JV_IN_EXP_JIB". Thank you.

    Hi
    have to use the commands before the lines as below
    /: IF t8jvb03-ceind = 'C' THEN
    /E  JIBCL_N /* Element JIBCL_N */
    /   &t8jvb11-jibcl& &t8jv11-cltext&
    /:  IF t8jvb11-jibsa <> '99999' THEN
    /E  JIBSA_N
    /    &t8jvb11-jibsa& &t8jvb11-satext&
    /:   ENDIF
    /E  COBJT_E
    /  &t8jvb11-cotype& &t8jvb11-cobject& &t8jvb11-fcmamt& &t8jvb11-fydamt&
    =  &t8jvb11-fidamt&
    /E  JIBCL_E
    /    Total: &t8jvb11-jibcl& &t8jvb11-cltext& &t8jvb11-fcmamt& &t8jvb11-fydamt& 
    =   &t8jvb11-fidamt&
    /:  ELSEIF t8jvb03-ceind = 'O' THEN
    /:  IF t8jvb11-jibsa <> '99999' THEN
    /E   JIBCL_N
    /    &t8jvb11-jibcl& &t8jv11-cltext&
    /E   JIBSA_N
    /   &t8jvb11-jibsa& &t8jvb11-satext& &t8jvb11-fcmamt& &t8jvb11-fydamt&
    =  &t8jvb11-fidamt&
    /:  ENDIF
    /E  JIBCL_E
    /   Total : : &t8jvb11-jibcl& &t8jvb11-cltext& &t8jvb11-fcmamt& &t8jvb11-fydamt&  =  &t8jvb11-fidamt&
    /:  ELSEIF t8jvb03-ceind = 'W' THEN
    Regards
    Anji

  • Problem with "Using Validators and Converters" example

    Hi,
    I am doing the Validatoris an Converters tutorial and I can't get it correctly executed.
    In step 9, I double click on textField1 and the systems goes to textField1_processValueChange function instead of textField1_valueChangeListener.
    I added the code of step 10 as a separate method and after executing it there is no error message. Please help. Thanks,
    I wish these examples where a little more of dummies: step 2 toke some time because you don't say "In the properties window". Please look the tutorials with people that does not know anything about the Creator.
    Also I wish you had a step by step tutorial with "About Components", "About Message Components", and "About Converters". Just reading , I did not grasp anything, so I prefer to create a project with these tutorials.
    Do I need to learn JSF in order to understand and use Creator? It seems as I read the tutoriasl you assume to much. I found that Cay Horstmann's Core JavaServer Faces book is downloadable at http://horstmann.com/corejsf/
    Thanks for your input,
    Lorenzo Jimenez

    Hi,
    You may find our book, Java Studio Creator Field Guide, helpful for a more gentle introduction to Creator and JSF components. We don't assume that you know JSF or even Java. We also have step-by-step instructions for building projects.
    Here's the link to our website:
    www.asgteach.com
    (You can download Chapter 2, which is the basic introduction to Creator.)
    Hope that helps.
    Gail and Paul Anderson

  • Problem with using iPhoto and Preview

    I needed to resize a picture in iphoto. I opened it in Preview and resized it. At the top of the Preview window, where the file name is, I wanted to rename it so it would be easier to find. It let me do that. I closed the picture. When I went to open it in iphoto, the thumbnail is there, but when I double click on the thumbnail, the exclamation mark appears. I cannot open it in Preview either. It says the size is 0. It also still shows the original filename. I can't find the picture in Finder, using either the original or new name. From what I've found online, it seems I've changed the pathway. I can't find anything to rename/change it back. Help!!!! (I repeated the process with a picture I didn't care about. Somehow I changed the name back and am able to open it again in iphoto. I can't for the life of me remember what I did!!!! Both pictures, with the original filename and the new one are in Preview, but I can't open the one with the new name.)
    (If renaming the picture means you can't access it anymore, why is that a feature?)

    Are you using the same User Account as before?
    Does anything here help"
    http://www.apple.com/support/ilife/tutorials/iphoto/ip1-3.html

Maybe you are looking for

  • FCC ERROR in Receiver CC

    Hi Experts i am facing the following error in the Receiver File Adapter . I am using the FCC for both the Sender and also teh Receiver. Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters

  • Cursor in required position

    Hi experts, My form is opening in enter query mode what i want is after performing the required action my cursor will go to a perticular item. suppose after executing one enquiry about a empno i want that my cursor will go to join_date item. can you

  • R/3 source system during Pro to Q refresh

    Hello BW Experts, Scenario: BWPRO ( production) refresh to BWQUA ( quality). BWPRO has PR3 as the source system for R/3 trasnfer rules are all based on this PR3 do the system refresh to BWQUA still the transfer rules refer to PR3 even if i create a n

  • PDF icons blank

    Hi, im having issue with some of my icon showing nothing, blanks. I'm not sure who else has this issue or if anyone has resolved it. The  PDF opens up just fine some its just annoying. Im running windows 8.1 64bit operating system. thanks

  • How to define a PO as Open or Outstanding ?

    Hi  Frineds, I just want to know on what basis we can define a PO as Open or Outstanding . Please clearly let me know , by giving the answer with Defination as well as conditions Helpful answers will be rewarded. Regards, Suresh.S