Generic Data Access For All Class

Hello
I am doing one experiment on Data Access. In traditional system We have to write each Insert, Update, Delete code in data access for each table.
My City Table Class:
public class TbCitiesModel
string _result;
int _cityID;
int _countryID;
string _name;
int _sortOrder;
bool _enable;
DateTime _createDate;
string _countryName;
public string result
get { return _result; }
set { _result = value; }
public int cityID
get { return _cityID; }
set { _cityID = value; }
public int countryID
get { return _countryID; }
set { _countryID = value; }
public string name
get { return _name; }
set { _name = value; }
public int sortOrder
get { return _sortOrder; }
set { _sortOrder = value; }
public bool enable
get { return _enable; }
set { _enable = value; }
public DateTime createDate
get { return _createDate; }
set { _createDate = value; }
public string countryName
get { return _countryName; }
set { _countryName = value; }
Traditional Code:
public List<TbCitiesModel> DisplayCities()
List<TbCitiesModel> lstCities = new List<TbCitiesModel>();
using (SqlConnection connection = GetDatabaseConnection())
using (SqlCommand command = new SqlCommand("STCitiesAll", connection))
command.CommandType = CommandType.StoredProcedure;
SqlDataReader reader = command.ExecuteReader();
while (reader.Read())
lstCities.Add(new TbCitiesModel());
lstCities[lstCities.Count - 1].cityID = Convert.ToInt32(reader["cityID"]);
lstCities[lstCities.Count - 1].countryID = Convert.ToInt32(reader["countryID"]);
lstCities[lstCities.Count - 1].name = Convert.ToString(reader["name"]);
lstCities[lstCities.Count - 1].sortOrder = Convert.ToInt32(reader["sortOrder"]);
lstCities[lstCities.Count - 1].enable = Convert.ToBoolean(reader["enable"]);
lstCities[lstCities.Count - 1].createDate = Convert.ToDateTime(reader["createDate"]);
return lstCities;
The above code is used to fetch all Cities in the table. But when There is another table e.g  "TBCountries" I have to write another method to get all countries. So each time almost same code but just table and parameters are changing.
So decided to work on only one global Method to fetch data from Database.
Generic Code:
public List<T> DisplayCitiesT<T>(T TB, string spName)
var categoryList = new List<T>();
using (SqlConnection connection = GetDatabaseConnection())
using (SqlCommand command = new SqlCommand(spName, connection))
command.CommandType = CommandType.StoredProcedure;
foreach (var prop in TB.GetType().GetProperties())
string Key = prop.Name;
string Value = Convert.ToString(prop.GetValue(TB, null));
if (!string.IsNullOrEmpty(Value) && Value.Contains(DateTime.MinValue.ToShortDateString()) != true)
command.Parameters.AddWithValue("@" + Key, prop.GetValue(TB, null));
SqlDataReader reader = command.ExecuteReader();
while (reader.Read())
int i = 0;
TB = Activator.CreateInstance<T>();
int colCount = reader.FieldCount;
foreach (var prop in TB.GetType().GetProperties())
if (prop.Name != "result" && i <= (colCount - 1))
prop.SetValue(TB, reader[prop.Name], null);
i++;
categoryList.Add(TB);
return categoryList.ToList();
Calling method:
TbCitiesModel c = new TbCitiesModel();
Program p = new Program();
List<TbCitiesModel> lstCities = p.DisplayCitiesT<TbCitiesModel>(c,"STCitiesAll");
foreach (TbCitiesModel item in lstCities)
Console.WriteLine("ID: {0}, Name: {1}", item.cityID, item.name);
Now Its working fine but I have tested with 10,00,000 Records in TBCities Table following are the result.
1. The Traditional method took almost 58 - 59 -  58 - 59 - 59 seconds for 5 time
2. The Generic Method is took 1.4 - 1.3 - 1.5 - 1.4 - 1.4  [minute.seconds]
So by the results of test is generic method is probably slower in performance [because its have 3 foreach loops] but the data is very big almost 10,00,000 lakes records. So it might work good in lower records.
1. So My question is can I used this method for real world applications ?? Or is there any performance optimization for this method?
2. Also we can use this for the ASP.NET C# projects??
Owner | Software Developer at NULLPLEX SOFTWARE SOLUTIONS http://nullplex.com

Hi
Mayur Lohite,
Q1:It is not reasonable compared Generic Code with Traditional Code. The main issue not Generic.
After take a look at your Generic Code.  Reflection code get slower in performance.
TB = Activator.CreateInstance<T>();
As Reflection is truly late bound approach to work with your types, the more Types you have for your single assembly the more slow you go on. Basically few people try to work everything based on Reflection. Using reflection unnecessarily will make your application
very costly.
Here is a good article about this issue, please take a look.
Reflection is Slow or Fast? A Practical Demo
Q2:Or is there any performance optimization for this method?
The article presents some .NET techniques for using Reflection optimally and efficiently.
optimizing object creation with reflection
Note optimize
reflection with Emit
method.
Best regards,
Kristin
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
Hello Kristin
Please can you tell how I optimize reflection in my code.
public List<T> DisplayCitiesT<T>(T TB, string spName)
var categoryList = new List<T>();
using (SqlConnection connection = GetDatabaseConnection())
using (SqlCommand command = new SqlCommand(spName, connection))
command.CommandType = CommandType.StoredProcedure;
foreach (var prop in TB.GetType().GetProperties())
string Key = prop.Name;
string Value = Convert.ToString(prop.GetValue(TB, null));
if (!string.IsNullOrEmpty(Value) && Value.Contains(DateTime.MinValue.ToShortDateString()) != true)
command.Parameters.AddWithValue("@" + Key, prop.GetValue(TB, null));
SqlDataReader reader = command.ExecuteReader();
while (reader.Read())
int i = 0;
TB = Activator.CreateInstance<T>();
int colCount = reader.FieldCount;
foreach (var prop in TB.GetType().GetProperties())
if (prop.Name != "result" && i <= (colCount - 1))
prop.SetValue(TB, reader[prop.Name], null);
i++;
categoryList.Add(TB);
return categoryList.ToList();
Thank you.
Owner | Software Developer at NULLPLEX SOFTWARE SOLUTIONS http://nullplex.com

Similar Messages

  • Generic Data Source for Hierarchies

    Hi guyz,
    Can any body tel how to create generic data source for hierarchies, plz give me the steps to do it.
    Thanks & Regards
    Veera

    1. Generate the DataSource for FI-SL sets using the BW IMG (Transaction BW07).
    2. FI-SL sets are not compounded in OLTP. If you want to extract FI-SL sets for a coumpound characteristic in BW, proceed as follows:
    a) Select the 'BW InfoObject (characteristic) is compounded' field and enter a data element (compound information of the meta data).
    b) After generating the DataSource, execute compounding in a customer exit. To do this create, a project for the SAP enhancement RSAP0001 in Transaction CMOD, and program EXIT_SAPLRSAP_004 (ZXRSAU04) as described in the attachment.
    3. Execute the following steps in BW:
    a) Update the meta data for the FI-SL sets in the InfoSource tree.
    b) Maintain the transfer structure and transfer rules.
    c) If the extracted set hierarchies contain intervals, you must allow intervals in hierarchies for the characteristic in BW. Check the hierarchy properties of the characteristic in Transaction RSD1 and set the "Intervals in hierarchies allowed"
    4. With this solution you can only extract sets created in Transaction GS01 (set class 0000).
    If the hierarchy list in BW for the set data source is empty, first check in the OLTP system whether set class 0000 contains suitable sets at all. To do this, start Transaction GS02 (not GS03!). Field Set class may be displayed; if this is the case, enter 0000 there. Position the cursor on field Set name and select F4. Enter the table and field name you specified in Transaction BW07 in popup "Select sets" and select "Continue (Enter)". If message GR003 "An appropriate object was not found" is displayed, the hierarchy list in BW is also empty.
    5. For CO groups (set class 01xx), the following DataSources are contained in the standard delivery
    ·     0ABCPROCESS_0107_HIER                    Business process
    ·     0ACCOUNT_0109_HIER                       Account number
    ·     0ACTTYPE_0105_HIER                       Activity type
    ·     0COORDER_0103_HIER                        Order
    ·     0COSTCENTER_0101_HIER                    Cost center
    ·     0COSTELMNT_0102_HIER                     Cost element
    ·     0PROFIT_CTR_0106_HIER                    Profit Center
    ·     0STKEYFIG_0104_HIER                      Stat. key figure
    On principle, sets can also be created for the DDIC fields of these objects in R/3 GS01.
    From Release 4.0, this no longer makes sense since the CO groups can then be used anywhere in FI-SL.
    With regard to the conversion of sets to CO groups in Release 4.0, please refer to the FI-SL-VSR Release Information for 4.0A and Notes 92029 and 51132.
    6. For other set classes, no DataSources are delivered.

  • HELP needed on Remote Management set to allow access for all users

    my mac mini snow leopard server runs in a data center and i use screen sharing to interact with it. i played with the sharing settings remotely yesterday and changed "allow access for" to all users. i was disconnected immediately and i couldn't logon again. i have no luck changing to other users. i don't want to make a special trip to the center to change it back to whatever it used to be. i can still use afp to connect but the screen sharing option is no longer available. what does "allow access for all users" mean anyway?
    thanks!

    As its name implies, allow access for all should allow any valid user account to access the server. I'm not sure why it's no longer working. It almost sounds like the ARDAgent crashed.
    Either way there's a command-line interface to the ARD preferences:
    /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/ki ckstart
    man kickstart discusses the options, including examples of how to enable access for specific users.

  • Doubt in Generic data sources for hierarchy & text

    Hi All,
    I have a couple of doubts as mentioned below.
    1 . Why we canu2019t generate generic data source for hierarchy?
    2. While creating Generic datasource for text there is one more option is available i.e. "Extraction from domain"
           what is domian please explain .
    Thanks & Regards,
    Saurabh Bansal

    Hi,
    1.We can't maintain Hierarchies in ECC, Because the Database design of the OLTP system is based on ERM(Entity Relationship       Model),i.e Tables are connected via Primary and Foriegn key relationships, Whenever we need 1: Many connection divide the data in different tables,connect  them using the primary and foriegn key relationships.
    2. Domain will provide the technical properties of the Field of the R/3 table.
    for Eg: length,data type of the field.

  • How can I monitor my monthly data usage for all 3 computers in my house? I have an Airport base station and it seems there should be software to monitor it from that point rather than monitoring the usage for each computer and then adding it up.

    How can I monitor my monthly data usage for all 3 computers in my house? I have an Airport base station and it seems there should be software to monitor it from that point rather than monitoring the usage for each computer and then adding it up.

    The following example was one of dozens that showed up on a simple Google search of.....
    monitor Internet data use on a Mac
    Watch your Internet usage with NetUse Monitor | Macworld
    Most service providers have an application for their users as well.

  • Can't activate direct data access for VProvider

    I try to activate direct data access for BC VirtualProvider 0TR_CM_1. When I open "Activate Direct Access" dialog I don't see any assigned source systems in "Source Syst. for InfoSource 3.x" nor  any in "Data Transfer Processes" tabs. Does it mean what non of source systems don't have direct access data sources? Or in other words - why I can't assign any source system for the BC VProvider?

    Hi,
           While creating datasource there is an option for direct access.This option  shows if the DataSource supports direct access to data.
    A RemoteProvider in BI can only get data from a DataSource that supports direct data access.
    It is only useful to access data directly if the quantity of data to be extracted can be restricted to a suitable selection.
    Hope this helps
    Regards
    Karthik

  • Finding the Generic data source for vendor master.

    Hi,
    I am trying to find the generic data source for 0VENDOR Infoobject on R3. But I am not able to find the exact match. Can any one help me? I just started on BW!!.
    Thank you

    Hi Tippireddy,
        you want to extract the vendor information through the business content then go through the following navigation...
      T.code RSA5 -> MM-IO (Master data Materials Management in general) -> 0VENDOR_ATTR or 0VENDOR_LKLS_HIER or 0VENDOR_TEXT these three are the standard data source for vendor.
    Regards,
    PRK

  • For all classes used in the alv reports.

    we need the list of required classes used in alv reports this urgent .
    please help me.

    Hi Navid,
    Check <b>SLIS Package/Dev.Class for node Classes</b>,
    here u will find all required <b>classes for ALV including ALV Hierarchical,AVL Tree, ALV HTML.</b>
    Classes.
    CL_ALVHT_HTMLINPUT-> ALV: HTML Input (Control Proxy)
    CL_ALVHT_HTML_PAGE-> ALV HTML Page
    CL_ALVHT_HTML_TEMPLATE-> ALV: HTML Templates
    CL_ALVHT_TAGSTREAM-> ALV
    CL_ALVHT_UI_ELEMENT-> ALV: HTML User Input Element
    CL_ALV_BDS-> BDS Access and Data Retention
    CL_ALV_CHANGED_DATA_PROTOCOL-> Message Log for Data Entry
    CL_ALV_DD_DOUBLE_LISTBOX-> Management Class for two D&D List Boxes
    CL_ALV_DD_LISTBOX-> D&D List Box
    CL_ALV_EVENT_DATA-> Changing Data Container for Events
    CL_ALV_EVENT_TOOLBAR_SET-> ALV Context Menu
    CL_ALV_GRAPHICS-> ALV Graphic (Integration with GFW)
    CL_ALV_GRAPHICS_CU-> Customizing of ALV Graphics
    CL_ALV_LISTBOX_DRAGOBJ->
    CL_ALV_OI BDS-> Access and Data Retention
    CL_ALV_TABLE_CREATE-> Dynamic Creation of ALV Data Table
    CL_ALV_TREE_BASE-> Basis Class ALV Tree Control
    CL_ALV_VARIANT-> ALV Variant Management
    CL_GUI_ALV_GRID-> ALV List Viewer
    CL_GUI_ALV_GRID_BASE-> Basis Class for ALV Grid
    CL_GUI_ALV_TREE-> ALV Tree Control
    Regards,
    Raghav
    Message was edited by:
            Raghavendra  L

  • User in hr can able to create records in PA30.But will give read only access for all infotypes

    Hi Team,
    I have created one test role in HR. It will give Read access to all info types.
    But user can able to create Info type records in PA30. Please find the P_ORGIN values below.
    Authorization level            R
    Infotype                       *
    Personnel Area                 US
    Employee Group                 1
    Employee Subgroup              U*
    Subtype                        *
    Organizational Key             *
    OOAC values.
    AUTSW ADAYS       15
    AUTSW APPRO 0
    AUTSW DFCON 4
    AUTSW INCON 0
    AUTSW NNCON 0
    AUTSW NNNNN 0
    AUTSW ORGIN 1
    AUTSW ORGPD 4
    AUTSW ORGXX 0
    AUTSW PERNR 1
    AUTSW XXCON 0
    Note : user does not have access to any structural profile.
    I suspect is this bcz, if any user has proper 0105 and 0001 in HR master data can able to create records.Bcz user will be assigned to default sap structural profile "ALL"  in OOSB ?
    I can see user was not assigned to "ALL" profile in OOSB or in T77UA. and user cant able to write or change infotype data in pa30.
    Please suggest how the user can able to create  inftotype records in PA30.(Info :0002 for example)
    Appreciate Quick response.
    Regards,
    Venu.

    Sorry did not get the below comment.
    "The maintain flag in the structural profile does not relate to any maintenance authorization in PA.  It only affects the OM objects authorized by the structural profile.  For example the user may be able to delimit a position.  It will never grant any write authorization for any PA infotype "
    Do you mean , suppose if we give Org unit and evaluation path like attached screen ,user will get access to only the ORG UNIT  as its object type (can able to perform activities as mentioned in the role PLOG ) but cant perform any activity like address infotype change on the person (P) (as mentioned in P_ORGIN) who comes under the org unit mentioned in Structural profile ?
    My understanding is that i believe user total auth is an intersection of general +structural authorization.lets take HR admin wanted to change 0002 data   for some imps in org.We need to give access to that particular org to which the emps belongs to (through structural auth) and SHOULD CHECK the maintenance box in strucural auth and will access change access via role.
    And user cant able to edit his own data.
    Please find the Screens as requested. Please let me know if my understanding is correct or not ?
    Regards,
    venu.

  • Data reconcilation for All GL accounts through FDFD

    Dear All,
    I have executed the data reconciliation for GL account through FDFD, after executing this job; I am not able to view any data in the cash management report through FF7A. its showing no data exists.
    Please let me know how to rectify this to view the cash position as per the GL balances.
    Regards,
    Rama Mohan

    Hello Rama,
    It is a little late but maybe this answer will be helpful for someone else...
    Something like this happened to me when I executed "Data Reconciliation", the thing that was happening is that the job didn't finish so it could just erase data but was not able to get data back, what I did was consult the log of the job through System --> Services --> Jobs --> Job Overview or transaction SM37, then I searched for my jobs and I saw that they were all canceled and the log said "The name of the printer ' ' doesn't exist" so what I did was add a new printer in system --> user profile --> Own data --> Defaults --> OutputDevice and I added a local printer like "LP01"; after this, I executed Data Reconciliation again and the job was succesful and it got data back.
    I hope this can help.
    Regards
    Erika Zagal de la Luz

  • BW Master data delta generic data source for further update in BW

    Hi BWers,
    I am looking for an option to load delta from Master data to another master data within BW. Export data source option for master data only has full load option but no delta update possible.
    I tried creating generic data source delta enabled on view of master data (/BI/M). But the problem I am facing now is master data contains quantity field as attribute and this field refers another table RSDKYF for unit. To be able to create data source on view / table no field should refer field in another table.
    Did anybody create delta for master data for further loading within BW or came across similar issue with key figures, please let me know the best procedure in this scenario? Appreciate your quick response.
    Regards,
    Madhav

    In your master data attribute have a date field which will be filled by the R/3 load as sy-datum - then create an export datasource and in the infopackage - give a selectoion for the date field as sy-datum and sy-datum -1..
    Not exactly a delta but then usually master data is not kept as delta because the volumes are usually less - you can achieve delta by this method...

  • "Date Modified" for all files being changed if "Automatically write to XMP" is on

    Recently upgraded from LR3 (v3.4.1) from LR2 on OSX 10.6.8 and have always had Catalog Settings > Automatically write changes into XMP turned on.
    When browsing existing JPG files in my Library (no Develop changes, no keywording, no Presets, no Import), LR3 is writing to disk — i.e., when I look at files in Finder, almost every viewed file’s “Date Modified” is being set to today’s date and time. (It actually creates a .swp file, then changes it's name back to .jpg)
    This is really bad, as it's making it impossible for me to use Finder to figure out when I last worked with a file, it is triggering needless Time Machine and Backblaze backups, and unnecessarily churning my disk.
    If I turn off "Automatically write..." this behavior stops. Per David Marx at thelightroomlab.com, I tried turning off this preference, manually doing a "Save Metadata to File" for all files, letting that complete, then turning the preference back on. This does not solve the problem.
    Per a suggestion at photoshop.com, I used ExifTool to see what changes LR was writing to a sample file; from the diff below, you can see that LR is adding a bunch of new fields as well as moving other fields around. But my point is that LR3 should never overwrite a file on disk if all I am doing is browsing thru them.
    Is anyone else seeing this? Any ideas would be greatly appreciated!
    -- David
    diff Exif5609_original Exif5609_update
    2c2
    < FileName: DSC_5609_original.JPG
    > FileName: DSC_5609_update.JPG
    5,6c5,6
    < FileModifyDate: 2009:11:27 21:32:54-08:00
    < FilePermissions: rwxr-xr-x
    > FileModifyDate: 2011:08:07 22:06:47-07:00
    > FilePermissions: rw-r--r--
    27a28,29
    > ShutterSpeedValue: 1/200
    > ApertureValue: 7.1
    55d56
    < SerialNumber: 3209521
    75d75
    < Lens: 18-200mm f/3.5-5.6
    185,188d184
    < UserComment:
    < SubSecTime: 00
    < SubSecTimeOriginal: 00
    < SubSecTimeDigitized: 00
    211a208,299
    > XMPToolkit: Adobe XMP Core 5.2-c004 1.136881, 2010/06/10-18:11:35
    > CreatorTool: Ver.1.00
    > MetadataDate: 2011:08:07 22:06:47-07:00
    > SerialNumber: 3209521
    > LensInfo: 18-200mm f/3.5-5.6
    > Lens: 18.0-200.0 mm f/3.5-5.6
    > ImageNumber: 26634
    > RawFileName: DSC_5609.JPG
    > SavedSettingsName: Import
    > SavedSettingsType: Snapshot
    > SavedSettingsParametersVersion: 6.4.1
    > SavedSettingsParametersProcessVersion: 5.0
    > SavedSettingsParametersWhiteBalance: As Shot
    > SavedSettingsParametersIncrementalTemperature: 0
    > SavedSettingsParametersIncrementalTint: 0
    > SavedSettingsParametersExposure: 0.00
    > SavedSettingsParametersShadows: 0
    > SavedSettingsParametersBrightness: 0
    > SavedSettingsParametersContrast: 0
    > SavedSettingsParametersSaturation: 0
    > SavedSettingsParametersSharpness: 0
    > SavedSettingsParametersLuminanceSmoothing: 0
    > SavedSettingsParametersColorNoiseReduction: 0
    > SavedSettingsParametersChromaticAberrationR: 0
    > SavedSettingsParametersChromaticAberrationB: 0
    > SavedSettingsParametersVignetteAmount: 0
    > SavedSettingsParametersShadowTint: 0
    > SavedSettingsParametersRedHue: 0
    > SavedSettingsParametersRedSaturation: 0
    > SavedSettingsParametersGreenHue: 0
    > SavedSettingsParametersGreenSaturation: 0
    > SavedSettingsParametersBlueHue: 0
    > SavedSettingsParametersBlueSaturation: 0
    > SavedSettingsParametersFillLight: 0
    > SavedSettingsParametersVibrance: 0
    > SavedSettingsParametersHighlightRecovery: 0
    > SavedSettingsParametersClarity: 0
    > SavedSettingsParametersDefringe: 0
    > SavedSettingsParametersHueAdjustmentRed: 0
    > SavedSettingsParametersHueAdjustmentOrange: 0
    > SavedSettingsParametersHueAdjustmentYellow: 0
    > SavedSettingsParametersHueAdjustmentGreen: 0
    > SavedSettingsParametersHueAdjustmentAqua: 0
    > SavedSettingsParametersHueAdjustmentBlue: 0
    > SavedSettingsParametersHueAdjustmentPurple: 0
    > SavedSettingsParametersHueAdjustmentMagenta: 0
    > SavedSettingsParametersSaturationAdjustmentRed: 0
    > SavedSettingsParametersSaturationAdjustmentOrange: 0
    > SavedSettingsParametersSaturationAdjustmentYellow: 0
    > SavedSettingsParametersSaturationAdjustmentGreen: 0
    > SavedSettingsParametersSaturationAdjustmentAqua: 0
    > SavedSettingsParametersSaturationAdjustmentBlue: 0
    > SavedSettingsParametersSaturationAdjustmentPurple: 0
    > SavedSettingsParametersSaturationAdjustmentMagenta: 0
    > SavedSettingsParametersLuminanceAdjustmentRed: 0
    > SavedSettingsParametersLuminanceAdjustmentOrange: 0
    > SavedSettingsParametersLuminanceAdjustmentYellow: 0
    > SavedSettingsParametersLuminanceAdjustmentGreen: 0
    > SavedSettingsParametersLuminanceAdjustmentAqua: 0
    > SavedSettingsParametersLuminanceAdjustmentBlue: 0
    > SavedSettingsParametersLuminanceAdjustmentPurple: 0
    > SavedSettingsParametersLuminanceAdjustmentMagenta: 0
    > SavedSettingsParametersSplitToningShadowHue: 0
    > SavedSettingsParametersSplitToningShadowSaturation: 0
    > SavedSettingsParametersSplitToningHighlightHue: 0
    > SavedSettingsParametersSplitToningHighlightSaturation: 0
    > SavedSettingsParametersSplitToningBalance: 0
    > SavedSettingsParametersParametricShadows: 0
    > SavedSettingsParametersParametricDarks: 0
    > SavedSettingsParametersParametricLights: 0
    > SavedSettingsParametersParametricHighlights: 0
    > SavedSettingsParametersParametricShadowSplit: 25
    > SavedSettingsParametersParametricMidtoneSplit: 50
    > SavedSettingsParametersParametricHighlightSplit: 75
    > SavedSettingsParametersSharpenRadius: +1.0
    > SavedSettingsParametersSharpenDetail: 25
    > SavedSettingsParametersSharpenEdgeMasking: 0
    > SavedSettingsParametersPostCropVignetteAmount: 0
    > SavedSettingsParametersGrainAmount: 0
    > SavedSettingsParametersLensProfileEnable: 0
    > SavedSettingsParametersLensManualDistortionAmount: 0
    > SavedSettingsParametersPerspectiveVertical: 0
    > SavedSettingsParametersPerspectiveHorizontal: 0
    > SavedSettingsParametersPerspectiveRotate: 0.0
    > SavedSettingsParametersPerspectiveScale: 100
    > SavedSettingsParametersConvertToGrayscale: False
    > SavedSettingsParametersToneCurveName: Linear
    > SavedSettingsParametersCameraProfile: Embedded
    > SavedSettingsParametersCameraProfileDigest: D6AF5AEA62557FCE88BC099788BBD3CC
    > SavedSettingsParametersLensProfileSetup: LensDefaults
    > SavedSettingsParametersToneCurve: 0, 0, 255, 255
    > IPTCDigest: d41d8cd98f00b204e9800998ecf8427e
    228,230d315
    < SubSecCreateDate: 2009:11:27 21:32:54.00
    < SubSecDateTimeOriginal: 2009:11:27 21:32:54.00
    < SubSecModifyDate: 2009:11:27 21:32:54.00
    http://feedback.photoshop.com/photoshop_family/topics/lr3_date_modified_for_all_files_bein g_updated_when_browsing_photos_if_catalog_settings_automatically_write_changes_into_xmp_is /replies/6313647

    clvrmnky wrote:
    davidpope007 wrote:
    Then when LR3 loaded my old LR2 images into memory, it "dirtied" the in-memory copy of the file by adding in these new LR3 XMP fields. Then, because I had "Automatically write XMP" on, it said "I better write these changes to disk".
    Yuck. As a former software engineer, this is very bad software engineering.
    It should wait until the user dirties the file (via Develop, keywords, etc.) before presuming to add a bunch of metadata fields that are unique to the new version of LR3.
    Well, I'm a current software developer, and this is, really, a perfectly reasonable thing to do. It is a reasonable trade-off for a convenient feature required by a small subset of users.
    Yes, in most cases the in-memory copy should "never" be dirtied unless the user makes a gesture of some sort, but like I said earlier, this option (once set by the user) sets up the situation where this gesture becomes implicit. This is a clear trade-off for the sake of convenience. And if the XMP is out of date and needs to be updated en masse, so be it.
    The fact is, there is no easy way around this. Do we save up /every/ dirty buffer somehow until you make a gesture that /might/ require the XMP to be up-to-date before acting on that gesture? Now we have to worry about unflushed buffers if something goes wrong and the app exits. Do we save the buffers to the DB? Now we have to block some calls to make another blocking call to flush some or all of those to DB, and then write some or all of it out to one or more files. In what order? What if there is a gesture to have X files with up-to-date XMP and some or all of those are in unflushed buffers, unflushed DB writes or we have to wait for the DB.
    As you can see, this is a transactionality nightmare, and the easiest and safest thing to get what the user wants (i.e., up-to-date XMP for the purpose of talking to a third-party XMP aware app) is to simply update the sidecar or XMP block in an atomic manner using the correct file IO. The file will have to change at some point, so it may as well be now.
    [Thanks to both of you for your detailed replies. I am aware of the need for tradeoffs so when you say the approach taken is quite reasonable, I do believe you. I also apologize in advance for the length of the following and am extremely aware of the time it must have taken you to compose the above replies, but I'm going to add a bit more, if only for my own piece of mind and in hopes of coming up with a solution for my workflow.]
    From my naive point of view, I was expecting the answer to be simply "don't raise the XMPDirtyFlag upon reading in a file". Obviously if your architecture requires you to "upgrade to latest XMP format" upon read, and another part of the system auto-detects "out of date XMP", then it's going to write those changes to disk.
    But it didn't need to be designed that way. LR obviously has mechanisms to know when a user has made a change to XMP so it is able to write XMP changes to disk only when necessary.
    The promise (to me) of "Automatically Write XMP changes to disk" was to auto-save my changes, and not those made for any internal (i.e., XMP versioning related) changes.
    Perhaps the premise is that it is LR3's job to update an individual file's XMP to the latest version so that other XMP-aware apps can make use of it? I would argue that those third-party XMP-aware apps already have to know how to deal with all prior versions of XMP, so LR3 should just leave well enough alone.
    You asked if my problem with your approach was that it was "inelegant"; not at all, it is based on my own perception of what I need from my workflow, so let me describe that so maybe we can find a better way:
    * Part of the appeal of LR to me is that it preserves my original file as it came off the memory card, allowing me to move to a different workflow/toolset in 2025 if I choose to do so
    * However, with all of changes contained in a single database file, I'm concerned about rare (but possible) corruption, so to mitigate this risk, I let LR backup my database weekly and it's also backed up continuously in the cloud via Backblaze
    * Even with backups of the database, there is still a chance that I could lose changes made to individual files (e.g., LR corrupts the DB and I have to go back to last week's DB)
    * Thus the appeal of the "auto-write to XMP" flag -- that way critical changes (develop, crop, keywords) are saved on a per-file basis; I liked the "automatic" part of this (as opposed to a manual save) because then I don't have to teach others in my family how to manually save XMP changes
    * A nice side-effect of this setting is now when I use Finder to find a file and double-click on it to edit it in Photoshop, all my develop changes are right there; (in other words, I like the flexibility of not having to fire up LR in order to just invoke PS from within it); also when I use Bridge I see all the keywords there
    * So with LR2, I had gotten used to what I thought was the best of all worlds -- autosave of changes at the file level via XMP + raw negatives untouched (i.e., Date Modified == the date I took the picture); this allows me to use operating-system-level tools -- Finder -- to locate/search for files
    * Now I upgrade to LR3 and I'm finally now understanding that a concept "XMP versioning" is going to result in changes to many, but not all my files. (That's something else that's annoying about this issue -- I open up the Grid and browse a folder of files, and only seemingly random ones I've cursored over seem to get written to disk -- if it's so urgent that LR3 update the XMP, then it should do it for all the files in the catalog or at least in that directory)
    Here's a screenshot from Finder of what I see everytime I look at this folder:
    * So now I have to assume that each new version of XMP and/or LR is going to touch my files on disk. Sigh.
    * What I don't like about this is that it is ruining the promise of "untouched raw negative". Yes, the image data is untouched -- which I agree is most of the benefit; but the file has been touched.
    * Perhaps you might empathize a bit more if you imagined that someone went thru all your source code or Word files and randomly changed the date to "today" because you upgraded compilers or moved to Word 2011.
    I agree all of this would be solved by having an XMP sidecar file for JPGs, but you indicate that's not going to happen.
    You've also alluded to the solution of "resetting the Date Modifed" to it's original value -- which I believe is what Finder does when you move or copy a file -- but that that is fraught with issues as well. I believe you when you say there are issues, but again the naive part of me wonders why that soultion would be so bad...
    I just thought of another potential solution -- turning on Date Created in Finder -- but it turns out that's changed, too.
    I am really at a loss as to what to do and would welcome your suggestions.
    Thanks again and kind regards,
    -- David

  • Trying to recover "date added" for all songs in itunes

    Hello, so recently I deleted some playlists off my iPhone in order to free up space for the time being and did not realize that Apple changed its iOS so that it deleted the playlists off my iTunes as well. When I did this before, it did not do that.
    So in an attempt to recover my lost playlists I moved my iTunes Library.itl and iTunes Library.xml to the desktop and then when I reopened iTunes I clicked import playlist and imported the iTunes Library.xml on the desktop.
    It reimported all my songs, but it didn't even recover the playlists I was trying to gain again. In addition now all my "date added" is today date's which is not very useful to me considering a lot of my playlists are organized by the date added feature.
    Is there anyway to get the date added back for all my songs? I still have the itunes library.itl and itunes library.xml that I moved to the desktop in the first place on the desktop.
    Thanks.

    Also it kept all other things (ratings, date modified, play count, everything except date added)

  • Exporting incoming email address by date range for all mailboxes

    I run a Small Business 2011 Standard server using Exchange 2010 for a small municipality.  A public records request was made for all email address that emailed any employee of that city between 1-1-2013 and 3-6-2014 .  There are about 160,000 emails
    for that date range but how can I just export a log of the senders email address with a time stamp?  Thank you in advanced for any help you can give.
    I should add that All logging is at defaults values 
    I found a "work around",  I have a Barracuda Message Archiver, I did a search of the date range and exported it to CSV, then imported it in to Excel and just deleted the extra data.
    Thanks for the fast replies 

    Good point, Belinda. If you have that time period within your log retention, then you should be able to do something with the Exchange Shell. This is a bit rough but could serve your purpose:
    #--- This finds the email addresses of the users whose city is set to Sydney.
    $Sydmbx = Get-ADUser -Filter {City -eq "Sydney"} -Properties homemdb, proxyaddresses | ?{$_.homemdb -ne $null}
    $Sydmbx | %{$Sydaddresses += $_.Proxyaddresses}
    $Sydaddresses = $Sydaddresses.TrimStart("SMTP:")
    $Sydaddresses = $Sydaddresses.TrimStart("smtp:")
    #--- Enter your HT servers here
    $ExchServ = @("exch01", "exch02")
    #--- This creates an object which lists senders who have sent to our recipient addresses, the timestamp and messageid.
    $Report =@()
    foreach ($server in $ExchServ){
    foreach ($addy in $Sydaddresses){
    $sentmail = Get-MessageTrackingLog -Server $server -Recipients $addy -Start "01/01/2013 12:00:00 AM" -End "06/03/2014 2:00:00 PM" -EventID Deliver -ResultSize Unlimited
    $sentmail | foreach{
    $Trackobj = New-Object PSObject
    $Trackobj | Add-Member -MemberType NoteProperty -Name "Recipient" -Value $addy
    $Trackobj | Add-Member -MemberType NoteProperty -Name "Timestamp" -Value $_.Timestamp
    $Trackobj | Add-Member -MemberType NoteProperty -Name "Sender" -Value $_.Sender
    $Trackobj | Add-Member -MemberType NoteProperty -Name "MessageID" -Value $_.MessageID
    $Report += $Trackobj
    $Report
    You can change the location to suit yourself as long as you populate "City" in AD and the server names with your own servers.

  • Unchecking 1904 date system for all excel files

    I discovered that the dates were off on my excel files, and that I need to uncheck the 1904 option in the preferences.
    However, I am wondering, if there is a way to do this for all of the excel documents I have, instead of having to go to every one individually.

    Microsoft Office is not an Apple product. Rather than posting in this forum, which is dedicated to Mac and Windows compatibility issues, I suggest posting your question in the Microsoft Excel for Mac newsgroup found here <http://groups.google.com/group/microsoft.public.mac.office.excel>.
    Good luck! bill
    1 GHz Powerbook G4   Mac OS X (10.4.9)  

Maybe you are looking for

  • HT204053 my mail will not open iclouds mail

    i need to change where verification email goes

  • Using iif inside a lookupset to change expression result

    Hey all, I've got an expression that is currently using a lookupset to pull data from a different dataset. I also need to replace the output of my expression with certain values, but I'm unable to figure out exactly what syntax I need for my iif stat

  • Determining Mouse Position

    I'm trying to determine the position of the mouse cursor relative to my content pane, while over an added component. I'd rather not do any calculating, since MouseEvent.getPoint() returns the point within the component the mouse is overbut will if no

  • Alerts for List Items

    Hello All, I'm trying to create a List with ,say , 7 questions..................and i want to link each question with an answer.......... i tried creating alerts for each of the question however not been able to understand how can i link the question

  • Spedizione guida utente pse 7.0 ita

    circa un mese fa ho acquistato sullo store di adobe la guida utente di pse 7 in italiano. pagamento tramite visa, ordine ricevuto da adobe che mi indica come data di consegna il giorno 10 giugno. ad oggi non mi è arrivato nulla, e non so cosa fare pe