Changed data rows backup

I want to take backup of only changed rows in a table.The table do not have timestamp column.How can I do it in 8i DB.The tables are not partitioned and not triggered due to perfoamnce slow down.
Please help
Prashant

> once i had to create a materialized view with fast
refresh option in oracle 8.0.4 i was not able to do
that because it did not allow me to do so eventhough
my mview satisfied all the criteria for fast refresh.
Finally i found that as a bug in oracle i dont
remember the exact bug no though
This is just fear and superstition.
Fast refresh snapshots are a documented feature of 8.0.4 and it is not helpful to make claims such as "it's not supported in 8i" and then use such vague unsubstatiated claims.
As pointed out, the OP should be on the latest patch set (or preferably a supported version), and should atleast TRY IT before discarding the accepted preferred approach.
Yes 8.0.4 was very buggy, we all lived through this pain. But since the OP hasn't actually responded with the actual version in case, it is hard to supply any further thoughts on this. I picked 8.0.4 as it was the earliest documentation verison I could locate in the archive to issue the point that FF Snapshots are supported in 8i.

Similar Messages

  • Where do changed data values goto if DB is in BACKUP mode for LONG PERIODs

    Where does oracle write if put the database in begin backup mode for LONG PERIODs. Lets say I issued a "ALTER DATABASE BEGIN BACKUP" command in a busy database and forgot about it for a long time.
    I understand that when the DB IS IN BEGIN BACKUP MODE, "the database copies whole changed data blocks into the redo stream." (Page 503 of 11.1 backup and recovery guide). But the redo stream is limited by the number of online redologs. After some time redologs also wont be sufficient for the changed data values after a begin backup is issued. I understand that there are archived redologs.
    Lets say there are 2 redolog groups in this database and Lets say 10 archive log files got generated since the ALTER DATABASE BEGIN BACKUP was issued.
    When i finally issue the "ALTER DATABASE END BACKUP" command, will Oracle sync the datafiles with the changed data blocks reading the data from these 10 archived log files ? What happens if i delete these archive redologs from the archive log destination. ??
    page 504 of 598 in the backup and recovery guide
    Caution : If you fail to take the tablespace out of backup mode,
    then Oracle Database continues to write copies of data blocks in
    this tablespace to the online redo logs, causing performance
    problems. Also, you receive an ORA-01149 error if you try to shut
    down the database with the tablespaces still in backup mode.
    it just says "performance problems", nothing more than that.*
    Any answers ? I am sure this question would have popped to some of you senior DBA people out there.

    user13076519 wrote:
    Where does oracle write if put the database in begin backup mode for LONG PERIODs. Lets say I issued a "ALTER DATABASE BEGIN BACKUP" command in a busy database and forgot about it for a long time. It writes just like it always does, plus it puts some extra in the redo log the [url http://oraclenz.com/2008/07/11/logging-or-nologging-that-is-the-question-part-ii/]first time a block is changed.
    >
    >
    I understand that when the DB IS IN BEGIN BACKUP MODE, "the database copies whole changed data blocks into the redo stream." (Page 503 of 11.1 backup and recovery guide). But the redo stream is limited by the number of online redologs. After some time redologs also wont be sufficient for the changed data values after a begin backup is issued. I understand that there are archived redologs. This appears to be a typo (incompleteness, really) in the backup and recovery guide.
    The redo stream is not limited by the number of of redo logs, only the volume of data. When a log fills up, it gets archived. If all the logs get filled up before the first one is finished archiving, the db will stall until the next redo becomes available. The only limit to archiving is disk space (and bandwidth if that is an issue, which it can be in some configurations).
    >
    Lets say there are 2 redolog groups in this database and Lets say 10 archive log files got generated since the ALTER DATABASE BEGIN BACKUP was issued.
    When i finally issue the "ALTER DATABASE END BACKUP" command, will Oracle sync the datafiles with the changed data blocks reading the data from these 10 archived log files ? What happens if i delete these archive redologs from the archive log destination. ??Archived logs are archived, Oracle only reads them in recovery. You do not understand archive logs, read the concepts manual.
    >
    page 504 of 598 in the backup and recovery guide
    Caution : If you fail to take the tablespace out of backup mode,
    then Oracle Database continues to write copies of data blocks in
    this tablespace to the online redo logs, causing performance
    problems. Also, you receive an ORA-01149 error if you try to shut
    down the database with the tablespaces still in backup mode.
    it just says "performance problems", nothing more than that.*Because it is overgeneralizing.
    >
    Any answers ? I am sure this question would have popped to some of you senior DBA people out there.Oh, you want to send me a gift for showing where in oracle it's documented? See [url http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:271815712711]here for something over a decade old.

  • Making atabase clone (but without data=rows) from hot-backup

    Hi,
    I am newbie in Oracle administration. I am using Oracle 10g database. I would like to clone database i.e. make an exact copy of tablespaces, tables, indexes, triggers, functions etc. but without data.
    What is the most efficient way to do it.? I am having the full hot backup of another database. Is it possible to restore a that backup using rman but without data (=rows) on the fresh installed oracle database
    Thanks for any advice
    Groxy

    I don't think RMAN has the feature you are looking for.
    For this purpose, it could be easier to use:
    - either old export with FULL=Y ROWS=N
    - or new data pump export with CONTENT=METADATA_ONLY.
    However in both cases you would need to recreate the empty database before importing the export file.
    Message was edited by:
    Pierre Forstmann

  • Bug in Data Collection Changes By Row for Dynamic domains?

    Hello,
    I was using the Data Collection Changes By Row? option on one of my dynamic domains.
    This resulted in a nullpointer exception for selected items on the jspx page.
    After some searching I found this was because the appmodule was null.
    And this was cause by the generated domains beans.xml.
    The generated code was:
    <property-name>applicationModule</property-name>
    <value>#{data.<appmodule datacontrol name>.dataProvider}</value>While it should have been:
    <property-name>applicationModule</property-name>
    <value>#{data.<appmodulename>DataControl.dataProvider}</value>I think this is related to me setting the datacontrolname on the appmodule under custom properties. But I think JHS should be able to detect that?
    Anton

    Anton,
    Currently JHeadstart has no support for customized data control names. However, I have added it to our list of enhancement requests.
    As a workaround, you can customize the Generator Template for the domains bean.
    kind regards,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

  • TS4036 Can you change the iCloud backup date to a previous backup date?

    Can you change the iCloud backup date? My iPhones processor went out and erased all of my information and saved that as my last iCloud backup, is there a way to restore my phone for the day before this happened to get all of my information back?

    Long story short, I had to make a clean install of OS X (mountain lion) when I was outside my country, and if I can't show the guy at the customs back home that I purchased the macpro before making the trip, I'll have to pay taxes for it.
    I could have filled the papers for that but I almost miss the plane and there was a long queue.

  • Can not change data in Input Ready Query

    All,
    I have created an input ready query on an aggreagation level which has one transactional cube underlying it however, after run the query I am unable to change data in the cells even though I get a warning message saying query is ready for input
    Note:
    1. The underlying realtime cube is in "Planning Mode:Loading not allowed" state in rsa1
    2. I tried including all characteristics so that the record can be uniquely identified at that aggregation level).
    3. I am not using any characteristic restrictions
    4. I have not set any data slices
    5. I have set the property for Planning "Start query in Change Mode"
    6. I have set the 'Key Figure' Planning Properties to "Can be changed Manually or via Planning Functions" for the key figures
    7. I do not have currency/unit in row/column.
    8. There are any locks occurring
    Any pointers welcome.
    Thanks,
    Milind

    Hi Milind,
    Was wondering how was your problem solved. I get the same message when I run the query in web from query designer and in bex analyzer the cells are not updated with the changes that I make.
    I am hitting my head against the wall to figure what could be the problem as my plan query is simply based on aggregation level created directlty upon the real time info cube.
    Have cross checked all the points that you mentioned in this post but I cells do not change.
    There should be some way around to solve this problem.
    Thanks

  • I recently updated my Iphone 5s to ios8 from ios7(.something) and lost all photos, text messages, etc. and then restored it using an old Icloud backup from 2014. I want to change the Icloud backup to one from this year.

    Is it possible to do this, and how? My iphone 5s is still restoring currently in the Backup settings and there's an option that says "Stop restoring Iphone" if I tap it, it says "any data that has not been downloaded will not be restored or backed up in the future"... AND I KNOW that if I update my iphone from ios7 to ios8 that it is a big jump and is the reason why I lost everything on it. So please don't tell me that is the answer to my question, because it's not. I am clearly asking if I can change the icloud backup date from 2014 to one from this year. This is because my iphone asked me which backup I want to use to restore my stuff from after the ios8 update. I hope this question isn't too confusing!!

    Lyncbane wrote:
    This exact same thing happened to me. Please help!
    Might be a better idea to look for more current threads that this one which is over a year old.

  • Can you help me about change data captures in 10.2.0.3

    Hi,
    I made research about Change Data Capture and I try to implement it between two databases for two small tables in 10g release 2.MY CDC implementation uses archive logs to replicate data.
    Change Data Capture Mode Asynchronous autolog archive mode..It works correctly( except for ddl).Now I have some questions about CDC implementation for large tables.
    I have one senario to implement but I do not find exactly how can I do it correctly.
    I have one table (name test) that consists of 100 000 000 rows , everyday 1 000 000 transections occurs on this table and I archive the old
    data more than one year manually.This table is in the source db.I want to replicate this table by using Change Data Capture to other stage database.
    There are some questions about my senario in the following.
    1.How can I make the first load operations? (test table has 100 000 000 rows in the source db)
    2.In CDC, it uses change table (name test_ch) it consists of extra rows related to opearations for stage table.But, I need the orjinal table (name test) for applicaton works in stage database.How can I move the data from change table (test_ch) to orjinal table (name test) in stage database? (I don't prefer to use view for test table)
    3.How can I remove some data from change table(name test_ch) in stage db?It cause problem or not?
    4.There is a way to replicate ddl operations between two database?
    5. How can I find the last applied log on stage db in CDC?How can I find archive gap between source db and stage db?
    6.How can I make the maintanence of change tables in stage db?

    Asynchronous CDC uses Streams to generate the change records. Basically, it is a pre-packaged DML Handler that converts the changes into inserts into the change table. You indicated that you want the changes to be written to the original table, which is the default behavior of Streams replication. That is why I recommended that you use Streams directly.
    <p>
    Yes, it is possible to capture changes from a production redo/archive log at another database. This capability is called "downstream" capture in the Streams manuals. You can configure this capability using the MAINTAIN_* procedures in DBMS_STREAMS_ADM package (where * is one of TABLES, SCHEMAS, or GLOBAL depending on the granularity of change capture).
    <p>
    A couple of tips for using these procedures for downstream capture:
    <br>1) Don't forget to set up log shipping to the downstream capture database. Log shipping is setup exactly the same way for Streams as for Data Guard. Instructions can be found in the Streams Replication Administrator's Guide. This configuration has probably already been done as part of your initial CDC setup.
    <br>2) Run the command at the database that will perform the downstream capture. This database can also be the destination (or target) database where the changes are to be applied.
    <br>3) Explicitly define the parameters capture_queue_name and apply_queue_name to be the same queue name. Example:
    <br>capture_queue_name=>'STRMADMIN.STREAMS_QUEUE'
    <br>apply_queue_name=>'STRMADMIN.STREAMS_QUEUE'

  • Identifying Changed Dates on Documents in SAP B1

    Greetingsu2026I have an unusual request that is somewhat long, very serious, and hope folks can help. 
    A headquarters customer believes a subsidiary company has u2018made upu2019 dates on invoices for previous billings.  They describe the date changes as u2018radicalu2019 but I have not personally seen these invoices as of yet and am waiting a FAX.  They requested I go into SAP B1 to see if someone has fabricated or made up or changed invoice dates and who it was.  They have some specific large-dollar invoices identified to research.  The person under suspect (who is no longer there) was considered an expert in SAP B1, so maybe she knew all of the different ways to change dates around.  Being an expert means also she might have used some unusual ways to change dates to the ones she wanted.
    Here are some of my ideas to discover this situation, but I hope someone can suggest even more steps because I would like to know every way that this situation can be discovered.
    1. Open the AR Invoices and use Data > Change Log and concentrate on dates.
    2. Run some SQL to validate document dates and system dates.  SELECT T0.DocNum, T0.DocDate, T0.CreateDate, T0.TaxDate, T0.UpdateDate FROM OINV T0 WHERE (T0.DocDate does not equal T0.CreateDate OR T0.TaxDate does not equal T0.CreateDate).  The results would show invoices that maybe had their dates changed.
    3.Run a Document Journal in the Financial Module.  Finance > Financial Reports > Accounting > Document Journal with the u2018Expanded Selectionu2019 of AR Invoices and a date range covering the invoices in question.  Then see if the Transaction Numbers are out of sequence.
    4. Run a Transaction Journal Report Financials > Financial Reports > Accounting > Transaction Journal Report with AR Invoices.  Compare this report to Document Journal.
    5. Run the Utilities functions of Utilities > Check Document Numbering to see if there any anomalies there in the document numbers.
    6. Run the Administration > System Initialization > Document Numbering function to see if a special series has been set up.
    7. Check out the AR Invoice numbering order by running another simple SQL covering a range of the invoices in question. SELECT T0.DocNum, T0.TaxDate, T0.CreateDate, T0.UpdateDate FROM OINV T0 WHERE T0.DocNum > 1583 AND T0.DocNum < 3251 ORDER BY T0.CreateDate.  Then see if the AR Invoice Numbering Sequence is not consistent.
    8. Check out those documents that are connected to each suspect AR Invoice and their associated dates by using the Target and Base Document icons.  For example, if a Deliver Document has dates of January 2007 but the AR Invoice date is September 2006, then someone has played around with dates on at least one of the documents.
    9. Get copies of the complete company database before the alleged changes were made and a company database as of today and compare the two contents.  Only good if the backups are maintained for a long time.
    Here come the questions on the ways I BELIEVE dates can be changed but not sure how to find and need to work on them:
    QUESTION 1 u2013 If a person DTWs invoices up into SAP B1, how can I tell that DTW was used to change the dates, the date of the DTW run, and the dates that were changed?
    QUESTION 2 u2013 If a person uses SQL to update dates on SAP B1, how can I find out that SQL has been used, the date of the SQL run, and the dates that were changed?
    QUESTION 3 u2013 If a person goes out and changes the workstation and/or server Date and Timestamp Properties, how can I find that they did that and the date changes?  You can do this on your PC by just changing the month, date, and year in Microsoftu2019s Date and Timestamp Properties.
    QUESTION 4 u2013 I know SAP has a policy that no SQL can be used to update databases and/or tables and have been told some customers lost support because they did this.  What does SAP do to discover this in their lab?
    QUESTION 5 u2013 Are there any notes in the portals to help me find changed dates?
    QUESTION 6 u2013 Are there any logs SAP B1 produces that can help identify such changes and how do I find and use them?
    QUESTION 7 (and this is big) u2013 Are the other ways dates can be changed on AR Invoices and how would I uncover the way it was done and the needed information of Original Date and Changed Date?
    Many, many thanks for any help provided since this is a serious situation.  If you can make any suggestions it would be greatly appreciatedu2026
    Zal
    Edited by: Zal Parchem on Mar 13, 2009 7:31 AM

    Hi Zal
    If this person was an "Expert" on SAP Business One then the only way they would have changed dates would probably be directly in SQL itself. The best way to determine this would be to hope that they slipped up somewhere and forgot to change a particular date in let's say one specific table.
    For invoices, start with the post date, doc date & create date. Then check each of these to the OJDT/JDT1 tables for any discrepancies. Next check the ADOC/ADO1 table for multiple instances on the invoice. If only 1 instance then check the create date, time & user as well as the aforementioned dates between OINV/INV1 & ADOC/ADO1. If multiple instances, check the dates from 1 instance to the next (This will indicate dates being changed in the system).
    Next check the same dates against OINM table. If any of the dates do not tally then the SQL was changed directly.
    Hope this helps. Let me know if you need further assistance.
    Kind regards
    Peter Juby

  • Right way to change datagrid row, column, cells background colors in code-behind?

    Hi all,
    I have a winform program that I'm upgrading to wpf (I'm new to wpf). The wpf code for the function (SetdataGridBackgroundColors()) is below with the winform code commented out so I can fix it.  I have a datagrid with a Cornsilk background color alteranating
    with LightGreen depending on the content of datetime  cell. If the day portion of the datetime is different then the color changes from one to the other. I used a colorIndex variable because at the end of the month it could go from 31 to 1 and that would
    not work if I use the day directly.
    I tried this line to change the background color:
    optionsDataDatagrid.RowBackground = new SolidColorBrush(Colors.Cornsilk);
    this works but it changes every row. I found this other stuff:
    DataGridRow currentRowColor = optionsDataDatagrid.ItemContainerGenerator.ContainerFromIndex(i) as DataGridRow;
    //DataGridRow currentRowColor = optionsDataDatagrid.ItemContainerGenerator.ContainerFromItem(optionsDataDatagrid.Items[i]) as DataGridRow;
    currentRowColor.Background = new SolidColorBrush(Colors.Cornsilk);
    Either ContainerFromIndex or ContainerFromItem throw an exception because currentRowColor is null. I looked at optionsDataDatagrid.Items[i] and is not null. Then I read that using ItemContainerGenerator is not a good idea.
    BTW I'm calling SetdataGridBackgroundColors() after datagrid is been filled with data.
    So... what is the proper way to set each row, column or cell background color in wpf?
    Thanks
    private void SetdataGridBackgroundColors()
    optionRowData rowData = new optionRowData();
    if (optionsDataDatagrid.Items.Count == 0)
    return;
    int colorIndex = 1;
    DateTime savedDate, currentRowDate;
    rowData = optionsDataDatagrid.Items[0] as optionRowData;
    savedDate = rowData.col_datetime.Date; //only compare the date not the time
    for (int i = 0; i < optionsDataDatagrid.Items.Count; i++)
    //currentRowDate = Convert.ToDateTime(optionsDataDatagrid.Rows[i].Cells[3].Value); //winform code
    //currentRowDate = currentRowDate.Date; //winform code
    rowData = optionsDataDatagrid.Items[i] as optionRowData;
    currentRowDate = rowData.col_datetime.Date;
    if (currentRowDate != savedDate)
    colorIndex++;
    savedDate = currentRowDate;
    if (colorIndex % 2 == 0)
    //optionsDataDatagrid.Rows[i].DefaultCellStyle.BackColor = Color.Cornsilk;
    //------------------- testing new code --------------begin
    optionsDataDatagrid.RowBackground = new SolidColorBrush(Colors.Cornsilk); //this changes all rows
    //DataGridRow currentRowColor = optionsDataDatagrid.ItemContainerGenerator.ContainerFromIndex(i) as DataGridRow;
    //DataGridRow currentRowColor = optionsDataDatagrid.ItemContainerGenerator.ContainerFromItem(optionsDataDatagrid.Items[i]) as DataGridRow;
    //currentRowColor.Background = new SolidColorBrush(Colors.Cornsilk);
    //------------------- testing new code --------------end
    //optionsDataDatagrid.Columns[4].DefaultCellStyle.BackColor = Color.DarkSalmon;
    //optionsDataDatagrid.Columns[5].DefaultCellStyle.BackColor = Color.Aquamarine;
    //optionsDataDatagrid.Rows[i].Cells[4].Style.ApplyStyle(optionsDataDataGridView.Columns[4].DefaultCellStyle);
    //optionsDataDatagrid.Rows[i].Cells[5].Style.ApplyStyle(optionsDataDataGridView.Columns[5].DefaultCellStyle);
    else
    //optionsDataDatagrid.Rows[i].DefaultCellStyle.BackColor = Color.LightGreen;
    //------------------- testing new code --------------begin
    optionsDataDatagrid.RowBackground = new SolidColorBrush(Colors.LightGreen); //this has no effect
    //------------------- testing new code --------------end
    //optionsDataDatagrid.Columns[4].DefaultCellStyle.BackColor = Color.Coral;
    //optionsDataDatagrid.Columns[5].DefaultCellStyle.BackColor = Color.LimeGreen;
    //optionsDataDatagrid.Rows[i].Cells[4].Style.ApplyStyle(optionsDataDataGridView.Columns[4].DefaultCellStyle);
    //optionsDataDatagrid.Rows[i].Cells[5].Style.ApplyStyle(optionsDataDataGridView.Columns[5].DefaultCellStyle);

    I (also) strongly recommend mvvm.
    Setting values is a particularly bad idea in this case.
    I don't mean to be rude but your explanation of the requirement is kind of vague.
    I would bind solidcolourbrushes.
    Set the properties based on whatever your logic is within the viewmodel.
    You can switch out what each of the brushes holds when the user clicks wherever.
    So you use a highlightbrush when something or other is true.
    That highlightbrush is set to a blue brush when the user clicks left and a red brush when they click right.
    Please don't forget to upvote posts which you like and mark those which answer your question.
    My latest Technet article - Dynamic XAML

  • Changing background color in JTable, only changes one row at a time...

    I'm trying to change the color of rows when the 5th column meets certain criteria. I think I'm very close, but I've hit a wall.
    What's happening is the row will change color as intended when the text in the 5th column is "KEY WORD", but when I type "KEY WORD" in a different column it will set the first row back to the regular colors. I can easily see why it's doing this, everytime something is changed it rerenders every cell, and the listener only checks the cell that was just changed if it met the "KEY WORD" condition, so it sets every cell (including the previous row that still meets the condition) to the normal colors. I can't come up with a good approach to changing the color for ALL rows that meet the condition. Any help would be appreciated.
    In this part of the CellRenderer:
            if (isSelected)
                color = Color.red;
            else
                color = Color.blue;
            if (hasFocus)
                color = Color.yellow;
            //row that meets special conditions
            if(row == specRow && col == specCol)
                color = color.white; I was thinking an approach would be to set them to their current color except for the one that meets special conditions, but the two problems with that are I can't figure out how to getColor() from the table, and I'm not sure how I would initially set the colors.
    Here's the rest of the relevant code:
        public void tableChanged(TableModelEvent e)
            int firstRow = e.getFirstRow();
            int lastRow  = e.getLastRow();
            int colIndex = e.getColumn();
            if(colIndex == 4)
                String value = (String)centerTable.getValueAt(firstRow, colIndex);
                // check for our special selection criteria
                if(value.equals("KEY WORD"))
                    for(int j = 0; j < centerTable.getColumnCount(); j++)
                        CellRenderer renderer =
                            (CellRenderer)centerTable.getCellRenderer(firstRow, j);
                        renderer.setSpecialSelection(firstRow, j);
    import javax.swing.table.*;
    import javax.swing.*;
    import java.awt.Component;
    import java.awt.Color;
    public class CellRenderer extends DefaultTableCellRenderer
        int specRow, specCol;
        public CellRenderer()
            specRow = -1;
            specCol = -1;
        public Component getTableCellRendererComponent(JTable table,
                                                       Object value,
                                                       boolean isSelected,
                                                       boolean hasFocus,
                                                       int row, int col)
            setHorizontalAlignment(JLabel.CENTER);
            Color color = Color.green;
            if (isSelected)
                color = Color.red;
            else
                color = Color.blue;
            if (hasFocus)
                color = Color.yellow;
            if(row == specRow && col == specCol)
                color = color.white;
            //setForeground(color);
            setBackground(color);
            setText((String)value);
            return this;
        public void setSpecialSelection(int row, int col)
            specRow = row;
            specCol = col;
    }If I'm still stuck and more of my code is needed, I'll put together a smaller program that will isolate the problem tomorrow.

    That worked perfectly for what I was trying to do, but I've run into another problem. I'd like to change the row height when the conditions are met. What I discovered is that this creates an infinite loop since the resizing triggers the renderer, which resizes the row again, etc,. What would be the proper way to do this?
    Here's the modified code from the program given in the link. All I did was declare the table for the class, and modify the if so I could add the "table.setRowHeight(row, 30);" line.
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import javax.swing.border.*;
    public class TableRowRenderingTip extends JPanel
        JTable table;
        public TableRowRenderingTip()
            Object[] columnNames = {"Type", "Company", "Shares", "Price", "Boolean"};
            Object[][] data =
                {"Buy", "IBM", new Integer(1000), new Double(80.5), Boolean.TRUE},
                {"Sell", "Dell", new Integer(2000), new Double(6.25), Boolean.FALSE},
                {"Short Sell", "Apple", new Integer(3000), new Double(7.35), Boolean.TRUE},
                {"Buy", "MicroSoft", new Integer(4000), new Double(27.50), Boolean.FALSE},
                {"Short Sell", "Cisco", new Integer(5000), new Double(20), Boolean.TRUE}
            DefaultTableModel model = new DefaultTableModel(data, columnNames)
                public Class getColumnClass(int column)
                    return getValueAt(0, column).getClass();
            JTabbedPane tabbedPane = new JTabbedPane();
            tabbedPane.addTab("Alternating", createAlternating(model));
            tabbedPane.addTab("Border", createBorder(model));
            tabbedPane.addTab("Data", createData(model));
            add( tabbedPane );
        private JComponent createAlternating(DefaultTableModel model)
            JTable table = new JTable( model )
                public Component prepareRenderer(TableCellRenderer renderer, int row, int column)
                    Component c = super.prepareRenderer(renderer, row, column);
                    //  Alternate row color
                    if (!isRowSelected(row))
                        c.setBackground(row % 2 == 0 ? getBackground() : Color.LIGHT_GRAY);
                    return c;
            table.setPreferredScrollableViewportSize(table.getPreferredSize());
            table.changeSelection(0, 0, false, false);
            return new JScrollPane( table );
        private JComponent createBorder(DefaultTableModel model)
            JTable table = new JTable( model )
                private Border outside = new MatteBorder(1, 0, 1, 0, Color.RED);
                private Border inside = new EmptyBorder(0, 1, 0, 1);
                private Border highlight = new CompoundBorder(outside, inside);
                public Component prepareRenderer(TableCellRenderer renderer, int row, int column)
                    Component c = super.prepareRenderer(renderer, row, column);
                    JComponent jc = (JComponent)c;
                    // Add a border to the selected row
                    if (isRowSelected(row))
                        jc.setBorder( highlight );
                    return c;
            table.setPreferredScrollableViewportSize(table.getPreferredSize());
            table.changeSelection(0, 0, false, false);
            return new JScrollPane( table );
        public JComponent createData(DefaultTableModel model)
            table = new JTable( model )
                public Component prepareRenderer(TableCellRenderer renderer, int row, int column)
                    Component c = super.prepareRenderer(renderer, row, column);
                    //  Color row based on a cell value
                    if (!isRowSelected(row))
                        c.setBackground(getBackground());
                        String type = (String)getModel().getValueAt(row, 0);
                        if ("Buy".equals(type)) {
                            table.setRowHeight(row, 30);
                            c.setBackground(Color.GREEN);
                        if ("Sell".equals(type)) c.setBackground(Color.YELLOW);
                    return c;
            table.setPreferredScrollableViewportSize(table.getPreferredSize());
            table.changeSelection(0, 0, false, false);
            return new JScrollPane( table );
        public static void main(String[] args)
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
        public static void createAndShowGUI()
            JFrame.setDefaultLookAndFeelDecorated(true);
            JFrame frame = new JFrame("Table Row Rendering");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.add( new TableRowRenderingTip() );
            frame.pack();
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);
    }Edited by: scavok on Apr 26, 2010 6:43 PM

  • No longer able to use + and - keys to change dates or time?

    I recently upgraded from an igloo iMac running OS 10.3.9 to a new Mac mini with 10.5.8 (awaiting upgrade to Snow Leopard).
    I used to use the + and - keys all the time to change dates and time in iCal, but have been unable to since my upgrade. Has that functionality been deleted, or is there a way to do it that I have just not discovered yet?
    Thanks.

    Forgotten Passcode or device disabled after entering wrong passcode
    If you have Find My iPhone enabled, you can use Remote Wipe to erase the contents of your device. If you have been using iCloud to back up, you may be able to restore the most recent backup to reset the passcode after the device has been erased.
    Alternatively, place the device in recovery mode and restore it to erase the device:
    Disconnect the USB cable from the device, but leave the other end of the cable connected to your computer's USB port.
    Turn off the device: Press and hold the Sleep/Wake button for a few seconds until the red slider appears, then slide the slider. Wait for the device to shut down.
    While pressing and holding the Home button, reconnect the USB cable to the device. The device should turn on.
    Continue holding the Home button until you see the Connect to iTunes screen.
    iTunes will alert you that it has detected a device in recovery mode. Click OK, and then restore the device.

  • Changing data in events in Table Maintenance generator

    Hi,
    My requirement is to default two fields while changing a row..
    I tried using event 01, 02 and 03...
    I used the below code..
    ZYREN-userid = sy-uname.
    zyren-lupdate = 0.
    Please help me in solving this..
    Thanks

    I have done this recently using event 01. Code is as follows, but I don't think that is the ideal way of doing things, but it works in my case. You have to figure out how to define the structure in your case. You can do that by placing a break-point in the subroutine and checking how the internal table TOTAL looks. Then define your structure just like that.
    form populate_created_date.
      data: begin of rec_data,
              sfa_id type /bic/oizucsiebel,
              date   type erdat,
              dummy(2),
            end   of rec_data.
      loop at total into rec_data.
        rec_data-date = sy-datum.
        modify total from rec_data.
      endloop.
    endform.                    "POPULATE_CREATED_DATE

  • How to save only changed data of ALV in a local table ?

    Hi everyone,
    I created and alv with cl_gui_alv_grid, and I made it editable
    Now I need that when I click on a button only the changed data to be saved on a local (internal) table
    Is there a way I can do that ?
    I tried with methods like check_changed_data() but they don't return a table like that
    Regards,
    Dren Selimi

    ok than
    class lcl_event_receiver definition.
         methods:
    * Handle Data Changed
         handle_data_changed
         for event data_changed of cl_gui_alv_grid
         importing er_data_changed,
    endclass.                    "lcl_event DEFINITION
    class lcl_event_receiver implementation.
         method handle_data_changed.
              data: ls_good type lvc_s_modi.
              loop at er_data_changed->mt_good_cells into ls_good.
                   read table gt_table into gs_table index ls_good-index. "is your changed row in ALV
                    ls_good-fieldname "is your changed field
                   if ls_good-fieldname eq 'MATNR'.
                        gs_table-matnr " is your changed field old value.
                   endif. "i couldn't find a dynamic solution for old value
                   "if you do not have so many columns in alv you can use this solution
                    ls_good-value "is your changed field new value
                   append these values to your changed field table.
                   modify gt_table from gs_table index ls_good-index.           
              endloop.
              call method g_alvgrid->refresh_table_display.
         endmethod.
    endclass.

  • Error: An error occurred while skipping data rows

    I am constantly getting error message “Error: An error occurred while skipping data rows”. Here is my scenario:
    I am pulling data from a text flat file which is Vertical Bar {|} delimited. My data source files naturally come without headers (no column names on first row). So what I did to bypass
    this is –
    I used a control file to supply the header names when I developed my package. This control file’s column names have corresponding column order used in the data source files.
    I then added an expression to my Flat File Connection Manager so that the system should automatically pick up new incoming files (files without headers).
    Now when I try to run my package I am receiving “Error: An error occurred while skipping data rows”. Could this be due to the fact that the system is expecting the column names which I
    entered when I developed the package while this new file does not have any headers, or could it be something different? There is very little information on the internet about this kind of error message. The only meaningful information that I have found is
    from the link below but unfortunately the case explained there is not the same as my situation.
    http://social.msdn.microsoft.com/forums/sqlserver/en-US/a790460b-9ef5-482b-b219-f55c05fa30d3/error-occured-while-skipping-data-rows
    I’m also aware that one can get the same error if the specified delimiter type on their package is different from the one on the flat file. Still that is not the case in my situation. Can
    someone please kindly help me troubleshoot this.
    Many thanks,
    Mpumelelo

    I have managed to address my problem. I did not have to manually enter some nearly 2000 column names by hand. Here is what I have done. I will explain it in detail for the benefit of those who might face the same problem but have no answers on how to work
    around it.
    I have maintained the column names from the control file because it was important for me to do this in the interest of some data flow components further down the pipeline. It therefore means that my package Flat File Source components have column names
    on both the External Column and Output Column sides.
    When I configured the Flat Files Source component using the control file I left the option “Column names in the first row” ticked as shown in the picture below. This is the default selection from Microsoft.
    I then went to my flat file connection manager; right clicked it and selected “Properties” to get something like shown below. You will notice that property “ColumnNamesInFirstRow” is down as “True” because when configuring my flat file manager I left
    that selection ticked. To address my problem I changed property “ColumnNamesInFirstRow” from “True” to “False” and saved my package.  This means that during runtime the package will not use the first row as column names but will use the already predefined
    column names which I entered from the control file. Please note that selecting the option of not using the first row as column names should be done from the Properties selection instead of the Flat File Source component. Changing this property from the Flat
    File Source component automatically changes all the metadata whereas doing this from the Properties selection leaves the metadata on the Flat File Source component unchanged.
    Mpumelelo

Maybe you are looking for

  • GeForce2Ti pro and tv-out

    I have a geforce2Ti pro with video-in and tv-out. When i try to connect my video card with tv i don't see anything. the tv options in avanced options is not enable. help me!

  • Is there a way to be notified by email when iOS 6 comes out?

    I was wondering if I can be notified by email when iOS 6 comes out.

  • Do i need to buy a new soundcard(Creative Inspsire T7900???

    i bought the Creative inspire t7900 and try to connect to my pc(integrated soundmax digital audio - three outputs-pink,green,blue.), but in all of ways i i've tried to connect it only front speakers(or only side s.,rear s.-depending on way of connect

  • Static NAT with IPSec tunnel

    Hi, I have a hopefully fairly basic question regarding configuring some static NAT entries on a remote site 887 router which also has a IPSec tunnel configured back to our main office.  I am fairly new to networking so forgive me if I ask some really

  • Package service responds with E_PACK_UNKNOWN_FILE_TYPE to an almost valid PDF

    Some PDFs cause Package service to respond with E_PACK_UNKNOWN_FILE_TYPE. The files are "almost valid" in a sense that they can be opened and displayed by both Acrobat Reader and OS X Preview. But they are not spec-compliant. First few lines in these