Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
L

LockonFlamingCliffs

@LockonFlamingCliffs
About
Posts
2
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Get rid of this programmer
    L LockonFlamingCliffs

    Functionally the code would work. Just weird, when some smarty-pants with a 4-years information system B.-degree and some >=3-years 'experience' codes crap like that. Imagine then, 4 out of 5 (internal) programmers at the company where i was emplyed, churned out crap like that, for a complex financial system. Mind you, the lead programmer was creating such code himself. I have, in my 9 years as developer came across countless exampless of coding horrors, which are created to show-off their 'skill'.

    Tom Moore wrote:

    I can't see anything wrong with that code. Attitudes like that stop people like me (Students from college) from becoming developers, because no-one wants a newbie. Catch 22.

    met vriendelijke groet, Michiel Erasmus

    The Weird and The Wonderful

  • Dataset.Merge problem
    L LockonFlamingCliffs

    Hi! I have written my own datatable merge function. It merges 2 datables, adding ew clumns to the source if those dont exists, and also append the new rows to the source. Hope my code is of help to you? Michiel Erasmus MaxCredible B.V. Nieuwezijds Voorburgwal 44 1012 SB Amsterdam Postbus 11079 1001 GB Amsterdam Postbus 11079 1001 GB Amsterdam T: +31(0)20-3449070 F: +31(0)20-3449071 I: http://www.maxcredible.com #region MergeDataTables(), merge 2 datatables. /// /// DOEL: Merge 2 datatables. /// AUTEUR: Michiel Erasmus /// DATUM: ©30-maart-2005 Maxcredible B.V. /// /// /// /// /// public DataTable MergeDataTables(DataTable dtInput, DataTable dtOutput) { return MergeDataTables(dtInput, dtOutput, false); } public DataTable MergeDataTables(DataTable dtInput, DataTable dtOutput, bool addNewRowsToMerged) { if(dtInput == null) { return dtOutput; } try { if(dtOutput == null) { dtOutput = dtInput.Clone(); //kopieer de structuur van de bron, straks kopieer allse van bron naar dtOutput. if(dtOutput == null) // het is onmogelijk die bron datatable te kopieren. { return dtOutput; } } try { foreach(DataColumn dc in dtInput.Columns) { if(dtOutput.Columns[dc.ColumnName] == null) { dtOutput.Columns.Add(dc.ColumnName, dc.DataType); } } } catch { string strTijdelijk; strTijdelijk = "dummy"; } //kopieer de data foreach(DataRow drInput in dtInput.Rows) { DataRow drOutput; if(dtOutput.Rows.Count == 0 || addNewRowsToMerged) { drOutput = dtOutput.NewRow(); // kopieer een rij uit de datatable. } else { drOutput = dtOutput.Rows[0]; } drOutput.BeginEdit(); foreach(DataColumn dcInput in dtInput.Columns) { try // kopieer de kolom, als die in de mergetable is, anders gewoon doorgaan. { drOutput[dcInput.ColumnName] = drInput[dcInput.ColumnName]; // kopieer per kolom } catch { string strTijdelijk; strTijdelijk = "dummy"; } } drOutput.EndEdit(); if(dtOutput.Rows.Count == 0 || addNewRowsToMerged) { dtOutput.Rows.Add(drOutput); } dtOutput.AcceptChanges(); } dtOutput.AcceptChanges(); } catch(Exception ex) { throw new Exception(ex.Message + "; Stacktrace=" + ex.StackTrace,

    Database database help question announcement
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups