Remove row from table when adding values to another table

hi am adding value programticaly how can i remove the row i just  add from the table
this is how am adding value
public void addMember(javax.faces.event.ActionEvent actionEvent) {
List<String> tempTable = new ArrayList<String>();
//Code to get the bindings for TargetVO :
RowKeySet selectedEmps = getEmpTable().getSelectedRowKeys(); 
Iterator selectedEmpIter = selectedEmps.iterator();
DCBindingContainer bindings =
(DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding empIter = bindings.findIteratorBinding("UserDetailsViewVO1Iterator");
RowSetIterator empRSIter = empIter.getRowSetIterator();
while(selectedEmpIter.hasNext()){
Key key = (Key)((List)selectedEmpIter.next()).get(0);
Row currentRow = empRSIter.getRow(key);
onRowCreate(currentRow);
boolean b = selectedEmps.remove(currentRow);
        i what to clear the row i just selected from the table
AdfFacesContext.getCurrentInstance().addPartialTarget(empTable);
// empTable
public void onRowCreate( Row currentRow ) {
BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
//access the name of the iterator the table is bound to.
DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("addmemberBeanIterator");
//access the underlying RowSetIterator
RowSetIterator rsi = dciter.getRowSetIterator();
//get handle to the last row
Row lastRow = rsi.last();
//obtain the index of the last row
int lastRowIndex = rsi.getRangeIndexOf(lastRow);
/*check if the user is added already*/
/*OperationBinding oper2 = (OperationBinding) bindings.get("check if user exists method binding");
oper2.getParamsMap().put("attributeName1", uniqueUserAttributeValue);
Object ret = oper2.execute();*/
//create a new row
Row newRow = rsi.createRow();
String f = (String)currentRow.getAttribute("Firstname");
String s = (String)currentRow.getAttribute("Surname");
String u = (String)currentRow.getAttribute("Username");
String n = (String)currentRow.getAttribute("Emailaddress");
// String orgid = (String)currentRow.getAttribute("Organisationid");
newRow.setAttribute("firstname", f);
newRow.setAttribute("surname", s);
newRow.setAttribute("name", u);
newRow.setAttribute("emailaddress", n);
// newRow.setAttribute("Organisationid1",orgid);
//initialize the row
newRow.setNewRowState(Row.STATUS_INITIALIZED);
//add row to last index + 1 so it becomes last in the range set
rsi.insertRowAtRangeIndex(lastRowIndex +1,  newRow);
//make row the current row so it is displayed correctly
rsi.setCurrentRow(newRow); 
System.out.println("Username " + u);
System.out.println("firstname " + f);
System.out.println("surname " + s);
System.out.println("email " + n);
// refereshpage();
// return null;
am in jdevloper 11.1.1.6.0
my table is
public void onRowCreate( Row currentRow ) {
BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
//access the name of the iterator the table is bound to.
DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("addmemberBeanIterator");
//access the underlying RowSetIterator
RowSetIterator rsi = dciter.getRowSetIterator();
//get handle to the last row
Row lastRow = rsi.last();
//obtain the index of the last row
int lastRowIndex = rsi.getRangeIndexOf(lastRow);
/*check if the user is added already*/
/*OperationBinding oper2 = (OperationBinding) bindings.get("check if user exists method binding");
oper2.getParamsMap().put("attributeName1", uniqueUserAttributeValue);
Object ret = oper2.execute();*/
//create a new row
Row newRow = rsi.createRow();
String f = (String)currentRow.getAttribute("Firstname");
String s = (String)currentRow.getAttribute("Surname");
String u = (String)currentRow.getAttribute("Username");
String n = (String)currentRow.getAttribute("Emailaddress");
// String orgid = (String)currentRow.getAttribute("Organisationid");
newRow.setAttribute("firstname", f);
newRow.setAttribute("surname", s);
newRow.setAttribute("name", u);
newRow.setAttribute("emailaddress", n);
// newRow.setAttribute("Organisationid1",orgid);
//initialize the row
newRow.setNewRowState(Row.STATUS_INITIALIZED);
//add row to last index + 1 so it becomes last in the range set
rsi.insertRowAtRangeIndex(lastRowIndex +1,  newRow);
//make row the current row so it is displayed correctly
rsi.setCurrentRow(newRow);  
System.out.println("Username " + u);
System.out.println("firstname " + f);
System.out.println("surname " + s);
System.out.println("email " + n);
// refereshpage();
// return null;

hi,
make the table selection single and use this links 4 ur task.
http://www.baigzeeshan.com/2010/06/deleting-multi-selected-rows-from-adf.html
http://deepakcs.blogspot.com/2013/01/ejb-dc-deleting-multi-selected-rows.html
https://forums.oracle.com/thread/2534813
https://blogs.oracle.com/jdevotnharvest/entry/iterating_selected_rows_in_an
txs

Similar Messages

  • Error message when adding values to another table

    hi i have a situation where am adding values from a view to a bean,my use case is i have a list of user in my view where am adding them to my bean by clicking the button,but now i what to validate when adding a user in such a way that if i added a use in my bean and i try to add that user again in current selection i must have validating error saying the user have been added already my code is
    Edited by: adf0994 on 2012/12/13 2:19 PM

    looks like you should have asked this in the ADF-forum...
    JDeveloper and ADF
    Why don't you simply configure the user name beeing unique in your entity?
    ADF would raise an exeption for you.
    public String onRowCreate( Row currentRow ) {
    return null;
    }Don't do that.
    returning a literal null is almost ever a mistake! In this certain case you should declare you methods return type as void and ommit the return statement.
    bye
    TPD

  • Temparally remove rows from a ADF table by action event of a jsf page.

    Hello Developers,
    I needed to temporally remove rows of a ADF table when execute action event of corresponding page.
    So in this case my task can describe by following steps,
    (1). I created a ADF table using <af:table> on a jsf page.
    (2). The data populated using a VO.
    (3). Several radio buttons added to the page for temporally remove rows from the table.
    This means one radio button check, it responsible to temporally remove rows which contain empty cell values of a identified column.
    If I check another radio button it should temporally remove identified data included rows but above removed (empty cell included rows) rows should appear in this event
    My ultimate target is temporally remove rows of a table & re call again removed rows another event without again & again query from BC.
    Pleas advice me to archive this task very sealy?
    (Are there have a way to do this using EL or coding in Manage bean ?)
    Thanks in advance..!

    Hi,
    the DCIterator gives you an option to iterate over the fetched rows (the ones you see in the table). You can try call removeAndRetain() on these rows. This will not remove or delete rows but allows you to insert these rows back to the collection.
    JavaDocs:
    * Removes the row from the collection and then retain it for insertion
    * into another location.
    * <p>
    * This method differs from <code>{@link #remove()}</code> in that
    * it just removes the row from the collection. It does not
    * remove the underlying Entity row(s) or database row(s).
    * <p>
    * This method also differs from <code>{@link #removeFromCollection()}</code>
    * in that after the row is removed from the collection, it can be inserted
    * back into the collection at another location.
    void removeAndRetain();
    Frank

  • I have a macbook pro with OSX 10.9.3 and Safari 7.0.4. How do I remove BING FROM SEARCHING when i type something into the search bar

    I have a macbook pro with OSX 10.9.3 and Safari 7.0.4. How do I remove BING FROM SEARCHING when i type something into the search bar

    See below if the search engine setting was changed without your knowledge and you can't change it back.
    You installed the "Genieo/InstallMac" rootkit. The product is a fraud, and the developer knowingly distributes an uninstaller that doesn't work. I suggest the tedious procedure below to disable Genieo. This procedure may leave a few small files behind, but it will permanently deactivate the rootkit (as long as you never reinstall it.)
    Malware is constantly changing to get around the defenses against it. The instructions in this comment are valid as of now, as far as I know. They won't necessarily be valid in the future. Anyone finding this comment a few days or more after it was posted should look for more recent discussions or start a new one.
    Back up all data. You must know how to restore from a backup even if the system becomes unbootable. If you don't know how to do that, or if you don't have any backups, stop here and ask for guidance.
    Step 1
    In the Applications folder, there may (or may not) be an application named "Genieo". Genieo may be partially installed even if this item is absent. If it's present, select it and open the Finder Info window. If it shows that theVersion is less than 2.0, download and install the current version from the genieo.com website. This may seem paradoxical, since the goal is to remove it, but you'll be saving yourself some trouble as well as the risk of putting the system in an unusable state.
    There should be another application in the same folder named "Uninstall Genieo". After updating Genieo, if necessary, launch "Uninstall Genieo" and follow the prompts to remove the "newspaper-style home page." Restart the computer.
    This step does not completely inactivate Genieo.
    Step 2
    Don't take this step unless you completed Step 1, including the restart, without any error messages. If you didn't find the Genieo application, or if you couldn't complete Step 1 for any reason, stop here and ask for instructions.
    Triple-click anywhere in the line below on this page to select it:
    /Library/Frameworks/GenieoExtra.framework
    Right-click or control-click the line and select
    Services ▹ Reveal in Finder (or just Reveal)
    from the contextual menu.
    If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination command-C. In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.
    A folder should open with an item named "GenieoExtra.framework" selected. Move that item to the Trash. You'll be prompted for your administrator password.
    Move each of these items to the Trash in the same way:
    /Library/LaunchAgents/com.genieo.completer.update.plist
    /Library/LaunchAgents/com.genieo.engine.plist
    /Library/LaunchAgents/com.genieoinnovation.macextension.plist
    /Library/LaunchDaemons/com.genieoinnovation.macextension.client.plist
    /Library/PrivilegedHelperTools/com.genieoinnovation.macextension.client
    /usr/lib/libgenkit.dylib/usr/lib/libgenkitsa.dylib
    /usr/lib/libimckit.dylib
    /usr/lib/libimckitsa.dylib~/Library/Application Support/com.genieoinnovation.Installer~/Library/LaunchAgents/com.genieo.completer.download.plist
    ~/Library/LaunchAgents/com.genieo.completer.update.plist
    If there are other items with a name that includes "Genieo" or "genieo" alongside any of those listed above, move them as well. There's no need to restart after each one. Some of these items will be absent, in which case you'll get a message that the file can't be found. Skip that item and go on to the next one.
    Restart and empty the Trash. Don't try to empty the Trash until you have restarted.
    Step 3
    From the Safari menu bar, select
    Safari ▹ Preferences... ▹ Extensions
    Uninstall any extensions you don't know you need, including ones called "Genieo" or "Omnibar," and any that have the word "Spigot" or "InstallMac" in the description. If in doubt, uninstall all extensions. Do the equivalent for the Firefox and Chrome browsers, if you use either of those.
    Your web browser(s) should now be working, and you should be able to reset the home page and search engine. If not, stop here and post your results.
    Make sure you don't repeat the mistake that led you to install this software. Chances are you got it from an Internet cesspit such as "Softonic" or "CNET Download." Never visit either of those sites again. You might also have downloaded it from an ad in a page on some other site. The ad has a large green button labeled "Download" or "Download Now" in white letters. The button is designed to confuse people who intend to download something else on the same page. If youever download a file that isn't obviously what you expected, delete it immediately.
    You may be wondering why you didn't get a warning from Gatekeeper about installing software from an unknown developer, as you should have. The reason is that the Genieo developer has a codesigning certificate issued by Apple, which causes Gatekeeper to give the installer a pass. Apple could revoke the certificate, but as of this writing, has not done so, even though it's aware of the problem. This failure of oversight is inexcusable and has compromised both Gatekeeper and the Developer ID program. You can't rely on Gatekeeper alone to protect you from harmful software.
    Finally, be forewarned that when Genieo is mentioned on this site, the perpetrator of the scam sometimes shows up under the name "Genieo support." He will tell you to run the provided uninstaller. As he knows and intends, the uninstaller does not completely remove the malware.

  • How  to retrieve one row from the number of records in a table

    i want to retrieve the rows from the number of records in a table without using the perticular column name.

    select count(*) from table
    /If you have your table currently analyzed, and no changes have been made, then you could
    select num_rows from user_tables where table_name = 'table'

  • Premiere elements 10 downloads but will not open? info says to remove disc from desktop -- when i do that it closes the program?

    premiere elements 10 downloads but will not open? info says to remove disc from desktop -- when i do that it closes the program?

    Hi, Ken -
    Since you have a new install of OSX, you may be missing Stuffit Expander, needed to expand downloads encrypted/archived in a Stuffit format. That problem confronted me with a new machine running OSX 10.6; a download and install of Stuffit Expander fixed it.
    You can download Stuffit Expander from this webpage -
    http://www.stuffit.com/mac-expander-download.html
    Note - be sure to get the version that matches your OSX version.

  • Problem removing rows from JTable

    Hello,
    I'm having an issue with a JTable that I'm using. At one point in my application, I want to remove all the rows from the table and regenerate them (from a database). When I try to remove the rows and do nothing else, they remain in the table. The rows are being removed from the model, as I have verified this in code, but the display does not refresh at all.
    I am using custom renderers to change the background color of a cell based on its value, and I disabled them to see if that was the problem, but alas, it is not.
    Any suggestions or ideas why this may be occurring?

    I am using model.setRowCount(0); to clear the model, however the display never refreshes. Then you are doing something wrong because its that simple. Only a single line of code is required.
    Perhaps I should have included this in my original post.Actually, you should have included demo code in your original post. That way we don't have to guess what you are doing.
    If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program (SSCCE) that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.

  • WCF Data services remove miliseconds from DateTime when expand

    I get some strange behavior, when using WCF Data Services 5.6. In my case, I have table, with 1 column set with Concurrency=Fixed, and this column hold date time field from database, updated each time when row is edited. In case I just retrieve entity -
    this column has correct value with milliseconds. But if I do mapping - milliseconds are removed.
    Here is a issue at glance :
    ====================================================================
    void Main()
    var b = from p in TABLE1 where p.ID == 100 select p;
    b.Dump();
    Request in this case is : Data.svc/TABLE1(100M) And data returned from service is :
    <d:COL1 m:type="Edm.DateTime">2015-02-16T12:13:52.972</d:COL1>
    ====================================================================
    As you can see , here time is returned with milliseconds - .972 In other case :
    void Main()
    var tmp = from p in TABLE1 where p.ID == 100 select
    new TABLE1()
    ID=p.ID,
    COL1=p.COL1
    var a1 = tmp.ToList();
    a1.Dump();
    Request in this case is : Data.svc/TABLE1(100M)?$select=ID,COL1
    <d:COL1 m:type="Edm.DateTime">2015-02-16T12:13:52</d:COL1>
    ====================================================================
    Time is returned without milliseconds.
    Does anybody have same problem? May be its a bug in the WCF Data services or in the model?

    Ok, seems like I found an answer to this, or at least way to avoid the problem.
    First I traced generated SQL from framework, and I see that in first case, im getting SQL
         SELECT ID, COL1 FROM TABLE1
    and in second case, I got
         SELECT ID, CAST( COL1 AS DATETIME) FROM TABLE1
    which cause the problem.
    Then I tried to update EF to version 6, WCF Data services to version 5.6.3,
    Oracle ODP to latest one, tried to use Oracle managed driver... no any success.
    Then I played little bit with table definition, and I saw that my col1 with type TIMESTAMP in database and DateTime in the model was defined as NOT NULL.
    If I remove this from database definition, I got right value with milliseconds.
    So , may be this is a bug in Oracle driver, but probably this is a bug in the WCF Data Services. At least I found a way to use concurrency in my case with this solution.

  • Suppressing Columns in Pivot table when adding subtotal

    Hi,
    We have a dimension hierarchy like this:
    Level 1 ---> Level 2 ---> Level 3
    T ---> A ----> B1
    T ---> A ----> B2
    T ---> C ----> D
    T ---> E ----> E
    The report we are trying to build is of this format:
    Row_Num --> Dimension --> Amount
    1 --> B1 ---> 100
    2 --> B2 ---> 50
    3 --> A ---> 150
    4 --> D ---> 75
    5 --> C ---> 75
    6 --> E ---> 100
    When using Pivot table and subtotals, we are getting the report as below: (where for Dimension Value "E" there are two rows)
    Row_Num --> Dimension --> Amount
    1 --> B1 ---> 100
    2 --> B2 ---> 50
    3 --> A Total ---> 150
    4 --> D ---> 75
    5 --> C Total ---> 75
    6 --> E ---> 100
    7 --> E Total ---> 100
    We do not want the subtotals to be calculated if Level 2 and Level 3 are the same.
    Any ideas on how to achieve this?
    Many Thanks,
    Seetharam

    Hi user7276913,
    Are you sure you are using a Pivot Table view? Or are you using the standard table view?
    In a pivot table, you can only have (n-1) sub-totals where n is the number of fields in your "Rows" section. So in your case you have two fields, so you can only have 1 sub-total. See my screen shot below where I have a similar situation:
    !http://i47.tinypic.com/icux5y.png!
    Note that in the screen shot only the first column has a summation and the second does not. This makes sense since a sub-total and the last column would be the same as the values being displayed in the "measures" section.
    What you described in your post seems more like what I'm seeing in a standard table view
    !http://i48.tinypic.com/34z12zp.png!
    Based upon what I'm seeing in your sample report, it seems like you are missing some kind of line item number or transaction number or some field that uniquely determines a row. If you add this field into the pivot table you will get exactly what you want.
    e.g. Pivot Table Rows = Customer # (with summation Enabled) , Document Type (Summation Enable), Line Number
    Good luck and if you found this post useful, please reward points!
    Best regards,
    -Joe

  • Send email when a value in the table reached a certain number

    Hello,
    I have a value in a table that when this value is equal or greater than a certain value, I want to send an email to alert. How do I accomplish this? Do I create a trigger? Do I write an o/s korn script and schedule to run continuosly and check for the value to send an email? Thanks.

    Hi, i think that the best form is create a trigger on the table, when insert o update the data send the email when the value accomplish the condition.
    Look the next code, it is a package that send emails,
    CREATE OR REPLACE
    PACKAGE oracle_administrator.dbms_mail_server
    IS
    P_SERVERNAME VARCHAR(50);
    P_RCPT VARCHAR(50);
    P_FROM VARCHAR(50);
    P_TO VARCHAR(50);
    P_SUBJECT VARCHAR(50);
    P_BODY CLOB;
    P_MAIL UTL_SMTP.CONNECTION;
    PROCEDURE INIT_SERVER;
    PROCEDURE SEND_EMAIL;
    PROCEDURE WRITE_DATA(PARAM_DATA IN CLOB);
    END;
    CREATE OR REPLACE
    PACKAGE BODY oracle_administrator.dbms_mail_server
    IS
    PROCEDURE SEND_EMAIL
    AS
    BEGIN
    UTL_SMTP.CLOSE_DATA(P_MAIL);
    UTL_SMTP.QUIT(P_MAIL);
    END;
    PROCEDURE INIT_SERVER
    AS
    BEGIN
    P_MAIL :=UTL_SMTP.OPEN_CONNECTION(P_SERVERNAME);
    UTL_SMTP.HELO(P_MAIL,'hostname');
    UTL_SMTP.MAIL(P_MAIL,'dbaoracle');
    UTL_SMTP.RCPT(P_MAIL,P_RCPT);
    UTL_SMTP.OPEN_DATA(P_MAIL);
    UTL_SMTP.WRITE_DATA(P_MAIL,
    'FROM: ' ||P_FROM || UTL_TCP.CRLF||
    'TO: ' || P_TO || UTL_TCP.CRLF ||
    'SUBJECT: ' ||P_SUBJECT || UTL_TCP.CRLF ||
    'MIME-VERSION: 1.0' ||CHR(13)|| CHR(10)||'CONTENT-TYPE: TEXT/HTML' || CHR(13)||CHR(10));
    END;
    PROCEDURE WRITE_DATA(PARAM_DATA IN CLOB)
    AS
    BEGIN
    UTL_SMTP.WRITE_DATA(P_MAIL,PARAM_DATA);
    END;
    END;
    Luck
    Have a goof day.
    Regards

  • White patch after removing row from JTable

    I am working with JTable and removing item from table on clicking on button but after removing row there is white Patch on that row. I don�t want to show this white patch.
    I did repaint table but that is also not working.
    Any thoughts !!!!!!!

    javax.swing.SwingUtilities.invokeLater(new Runnable(){
                public void run(){
                  museTable.setBackground(Color.black);//your color here
              });

  • New rapport crashes CR when adding more than one table

    Hello SAP Community Network Forums.
    First post, so I hope I landed in the right place.
    If I create a new rapport and add more than 2 tables to the rapport, CR shutdown. The following error is generated:
    Event Type:     Error
    Event Source:     Application Error
    Event Category:     (100)
    Event ID:     1000
    u2026
    Description:
    Faulting application crw32.exe, version 11.5.12.1838, faulting module pgoe1024.dll, version 6.0.0.168, fault address 0x00018404.
    a)     Installed a trial version of CR 2008. Same result.
    b)     Using:  XI 11.5.12.1838
    c)     Running against a Progress 10.2B db. Updated with SP 4.
    d)     Existing rapport is running fine (as long as no more than 1 table is added)
    Any ideas/suggestions would be much appreciated. Regards, Lars.
    Edited by: larsc-app on Apr 29, 2011 3:40 PM

    Hi!
    Are you using auto smart linking functionality of Crystal ? If so, try without auto smart linking with tables - works with me...
    I think the bug is laying on the newest odbc-driver of OpenEdge, above few rows of readme file that game with openedge 10.2b sp05 :
    Note: OE00205286    Type: Workaround
    A file DSN connection to Crystal RDC fails with ODBC 6.0 Drivers
    DataDirect ODBC 6.0 drivers can not handle the full path of a file DSN, causing
    a connection to Crystal RDC to fail. Use the ODBC 5.3 drivers instead of 6.0
    with Release 10,2B05 to work around this problem with the driver.
    -> if you can, try to use older driver (pgoe23...)..
    -Ari

  • Remove Item From Calendar When List Item is Set To Cancelled

    I have created a custom workflow where users submit a request form to a mailing list. The approvers can choose to approve, deny or cancel the request. If the request is approved, it is added to the calendar on the site. The problem that I am having is that
    sometimes a user wishes to cancel their request after the request has already been approved and placed on the calendar. How can I remove the calendar entry but still keep the request on file?
    Thank you in advance!

    Inderjeet,
       Thank you for your response. While this seems close, I do not think that this is what I'm really looking for. 
       Here is the process that I would like to be able to have happen:
    1. A request form is completed and sent to a SharePoint list
    2. Reviewer approves of the completed form
        a. Upon approval, a calendar entry is created automatically.
    3.  The request is deemed to be no longer needed and therefore needs to be removed from the calendar.
          a. Reviewer changes the status of the Request Form to "Cancelled"
          b. Calendar entry is removed automatically from the calendar ---- BUT, the request form is NOT deleted.

  • Is it necessary to update scope_info and scope_config when adding columns to a table in a provisioned database?

    I followed the example provided in
    https://jtabadero.wordpress.com/2011/04/13/modifying-sync-framework-scope-definition-part-3-workarounds-addingremoving-columns/ to add columns to a table in a provisioned database.  The sample code replaces the stored procedures triggered when the
    table is updated with new stored procedures which include the additional columns
    However, the sample does not update scope_config. When I am finished, the new columns do not appear in the scope config.  Looking at the SQL code it is immediately obvious why.  Here is an excerpt from the beginning of the query
    DROP PROCEDURE [PATIENT_insertmetadata];
    DROP PROCEDURE [PATIENT_updatemetadata];
    DROP PROCEDURE [PATIENT_deletemetadata];
    -- BEGIN Enable Snapshot Isolation on Database 'PatScan' if needed
    IF EXISTS (SELECT NAME FROM sys.databases where NAME = N'PatScan' AND [snapshot_isolation_state] = 0)
    BEGIN
     ALTER DATABASE [PatScan] SET ALLOW_SNAPSHOT_ISOLATION ON
    END
    GO
    -- END Enable Snapshot Isolation on Database 'PatScan' if needed
    -- BEGIN Create Scope Info Table named [scope_info]
    IF NOT EXISTS (SELECT t.name FROM sys.tables t JOIN sys.schemas s ON s.schema_id = t.schema_id WHERE t.name = N'scope_info' AND s.name = N'dbo')
    BEGIN
     CREATE TABLE [scope_info] ([scope_local_id] int IDENTITY(1,1) NOT NULL, [scope_id] uniqueidentifier DEFAULT NEWID() NOT NULL, [sync_scope_name] nvarchar(100) NOT NULL, [scope_sync_knowledge] varbinary(max) NULL, [scope_tombstone_cleanup_knowledge] varbinary(max)
    NULL, [scope_timestamp] timestamp NULL, [scope_config_id] uniqueidentifier NULL, [scope_restore_count] int DEFAULT 0 NOT NULL, [scope_user_comment] nvarchar(max) NULL)
     ALTER TABLE [scope_info] ADD CONSTRAINT [PK_scope_info] PRIMARY KEY ([sync_scope_name])
    END
    GO
    -- END Create Scope Info Table named [scope_info]
    -- BEGIN Create Scope Config Table named [scope_config]
    IF NOT EXISTS (SELECT t.name FROM sys.tables t JOIN sys.schemas s ON s.schema_id = t.schema_id WHERE t.name = N'scope_config' AND s.name = N'dbo')
    BEGIN
     CREATE TABLE [scope_config] ([config_id] uniqueidentifier NOT NULL, [config_data] xml NOT NULL, [scope_status] char NULL)
     ALTER TABLE [scope_config] ADD CONSTRAINT [PK_scope_config] PRIMARY KEY ([config_id])
    END
    GO
    -- END Create Scope Config Table named [scope_config]
    In an already provisioned database, the scope_info and scope_config tables already exist.  Hence the portions of the script to create the scope_info and scope_config tables are skipped.  I tried modifying the query to drop these tables.  When
    I do so, ne tables are created but they only define the modified table.
    Is it necessary to update scope_info and scope_config?  Are there are side effects (such as deprovisioning) if I drop and then recreate these tables? Can I just update the existing scope_config, replacing the portion of the XML which defines the table
    being modified? Do I have to make changes in scope_info?
    Thanks
    Howard Weiss
    Howard P. Weiss

    I followed the example provided in
    https://jtabadero.wordpress.com/2011/04/13/modifying-sync-framework-scope-definition-part-3-workarounds-addingremoving-columns/ to add columns to a table in a provisioned database.  The sample code replaces the stored procedures triggered when the
    table is updated with new stored procedures which include the additional columns
    However, the sample does not update scope_config. When I am finished, the new columns do not appear in the scope config.  Looking at the SQL code it is immediately obvious why.  Here is an excerpt from the beginning of the query
    DROP PROCEDURE [PATIENT_insertmetadata];
    DROP PROCEDURE [PATIENT_updatemetadata];
    DROP PROCEDURE [PATIENT_deletemetadata];
    -- BEGIN Enable Snapshot Isolation on Database 'PatScan' if needed
    IF EXISTS (SELECT NAME FROM sys.databases where NAME = N'PatScan' AND [snapshot_isolation_state] = 0)
    BEGIN
     ALTER DATABASE [PatScan] SET ALLOW_SNAPSHOT_ISOLATION ON
    END
    GO
    -- END Enable Snapshot Isolation on Database 'PatScan' if needed
    -- BEGIN Create Scope Info Table named [scope_info]
    IF NOT EXISTS (SELECT t.name FROM sys.tables t JOIN sys.schemas s ON s.schema_id = t.schema_id WHERE t.name = N'scope_info' AND s.name = N'dbo')
    BEGIN
     CREATE TABLE [scope_info] ([scope_local_id] int IDENTITY(1,1) NOT NULL, [scope_id] uniqueidentifier DEFAULT NEWID() NOT NULL, [sync_scope_name] nvarchar(100) NOT NULL, [scope_sync_knowledge] varbinary(max) NULL, [scope_tombstone_cleanup_knowledge] varbinary(max)
    NULL, [scope_timestamp] timestamp NULL, [scope_config_id] uniqueidentifier NULL, [scope_restore_count] int DEFAULT 0 NOT NULL, [scope_user_comment] nvarchar(max) NULL)
     ALTER TABLE [scope_info] ADD CONSTRAINT [PK_scope_info] PRIMARY KEY ([sync_scope_name])
    END
    GO
    -- END Create Scope Info Table named [scope_info]
    -- BEGIN Create Scope Config Table named [scope_config]
    IF NOT EXISTS (SELECT t.name FROM sys.tables t JOIN sys.schemas s ON s.schema_id = t.schema_id WHERE t.name = N'scope_config' AND s.name = N'dbo')
    BEGIN
     CREATE TABLE [scope_config] ([config_id] uniqueidentifier NOT NULL, [config_data] xml NOT NULL, [scope_status] char NULL)
     ALTER TABLE [scope_config] ADD CONSTRAINT [PK_scope_config] PRIMARY KEY ([config_id])
    END
    GO
    -- END Create Scope Config Table named [scope_config]
    In an already provisioned database, the scope_info and scope_config tables already exist.  Hence the portions of the script to create the scope_info and scope_config tables are skipped.  I tried modifying the query to drop these tables.  When
    I do so, ne tables are created but they only define the modified table.
    Is it necessary to update scope_info and scope_config?  Are there are side effects (such as deprovisioning) if I drop and then recreate these tables? Can I just update the existing scope_config, replacing the portion of the XML which defines the table
    being modified? Do I have to make changes in scope_info?
    Thanks
    Howard Weiss
    Howard P. Weiss

  • How do i prevent removed apps from syncing when connecting to iTunes

    I've "removed" apps from my iPad to free up space but when I connect to my computer, the apps "appear" to still sync. 
    To the upper right of the screen, it will show there are 65 apps (I removed 20 apps).  These are active apps and that is correct  When I click on the status bar at the bottom of the screen (the Apps section), it shows there are 85 apps taking up space on my iPad.
    Also, where the apps are listed, the apps that were "removed" from my iPad air have an option to "Install".   I don't understand why they're still syncing.  TIA for your help!

    This does not help but it does offer some insight. I have NEVER noticed this before. Take a look at the dialog box in the is screenshot. Note that it says that even if the app is deleted from the iTunes library, it will not be removed for any iOS devices when you sync.
    As an experiment, I deleted the AOL On app from my iTunes library and followed the prompts to put the app in the trash - not keep it in the mobile sync folder. I synced my iPad - and the app is still on the device even though it does NOT appear in my list of apps in iTunes when the iPad is connected and selected. I have never seen that happen before.
    If the app is not in your library, I always assumed that it would be erased when you sync since it is no longer in iTunes. I deleted the app in iTunes and then deleted it on the iPad and then synced again and now it is gone everywhere.
    Bizarre....

Maybe you are looking for

  • Having issues with iTunes 11.1.5 on Windows 8.1

    Ever since I've refreshed my windows computer two weeks ago. I am having issues with iTunes 11.1.5. For some reason I can access the iTunes Store, but most of the time when I do something internet related on iTunes, the app is either stuck on checkin

  • Importing Java Bean Model in Webdynpro Development Component

    Hi All, Is there any simple tutorial, example  to import java bean model in webdynpro development component. I am using NWDS 7.0 SP14 and WAS 7.0. it really helps if you can  provide simple EJB as a development component with details how to create a

  • Prob creating a new structured data type

    I am trying to create a new structured data type to see it in data type diagram. When i try to right click on structured data type in DATA TYPES, i cant see any option like new structured data type etc. But this is working for distinct as well collec

  • Save PDF with selected layers

    I have a Ai with severel layers. I want to save only a few in a PDF and make the other invisible. How comes they all show up sometimes anyway??

  • Why does ipad open iPhoto?

    Each time I plug it in iPhoto opens. I have tried to search preferences for this in iPhoto and in iTunes and don't find anything that seems relevant. It did not use to do this but has begun to do so since going to Yosemite. How can I prevent this fro