Home All Groups Group Topic Archive Search About
Author
13 Jun 2006 11:25 PM
Jeff Boeker
The basic architecture for my project is to have a dataset in one server
module which has a series of dlls that read/write to the dataset and have a
separate AppDomain GUI module that will also read and write the data. 

I plan to use remoting to transfer the dataset, tables to the GUI module. 
Right now I have a DataSetInterface class shared by server and GUI that
marshals by reference but since DataSet and DataTable are marshal by value
objects (which I return from get functions) the changes in the GUI aren't
seen in the server.  (The changes from the dlls are seen in the GUI.) 

What is the best way for the GUI to make changes given that the record count
is fixed at runtion (no added rows) and while initially loaded from a
database it is never committed and exists only in memory.  I'm thinking of
add inga write function in my DataSetInterface class something like this:

        public void writeValueToDataTable(string strTable, string
strSchematicName, string strColumn, object objValue)
        {
            DataRow[] aDataRows;

            CIODataSet.Instance.IOData.Tables[strTable].Select(strRow);
            aDataRows =
CIODataSet.Instance.IOData.Tables[strTable].Select("[Schematic Name] = '" +
strSchematicName + "'");
            System.Diagnostics.Debug.Assert(aDataRows.Length == 1);
            aDataRows[0]["Value"] = objValue;
        }

What is the best way to write to the dataset given my architecture?

Thanks,

Jeff

AddThis Social Bookmark Button