I have an XML Database that I am loading into a Dataset object in a C# 2008 Windows Forms project. I need to know how to access the individual fields and values. The actual database is not in my control, so I have to use it as given. And I need to be able to offer portions of the values for editing, while hiding others. So I need to how to access each individual field and value. Here is a very tiny mocked up version of the XML code: <?xml version="1.0"?> <database version="1.0"> <DatabaseItem name="FirstTable"> <DatabaseSubitem id="1"> <DatabaseField name="Id" value="1" /> <DatabaseField name="Freq" value="151955000" /> <DatabaseField name="Mode" value="Mode:Selective" /> </DatabaseSubitem> <DatabaseSubitem id="2"> <DatabaseField name="Id" value="1" /> <DatabaseField name="Freq" value="151955000" /> <DatabaseField name="Mode" value="Mode:Selective" /> </DatabaseSubitem> <DatabaseSubitem id="3"> <DatabaseField name="Id" value="65535" /> </DatabaseSubitem> </DatabaseItem> <DatabaseItem name="SecondTable"> <DatabaseSubitem id="0"> <DatabaseField name="access_p" value="500" /> </DatabaseSubitem> </DatabaseItem> <DatabaseItem name="ThirdTable"> <DatabaseSubitem id="0"> <DatabaseField name="access_Short" value="500" /> </DatabaseSubitem> </DatabaseItem> </database> If there is an easier way than the Dataset object to process the database, please let me know. Any help would be most appreciated. Thanks, Bruce
DTWC_Lawrence
Posts
-
How to access fields and values from an XML Database -
Run-Time Licensing For VB6 Controls in C#Can anyone tell me how to acquire a run-time license specifically for the MSComm.ocx that shipped with Visual Basic 6 to be used in a C# project? I have searched both here and in the MSDN KB, I found a reference to adding a run-time license to a C++.Net project, but even that wasn’t functional. I have a C# project in which I am using this control, and it works great in the development environment, however, when I tried deploying my application, I got the obnoxious “You-don’t-have-a-run-time-license” BS. To anyone that can help, thanks ever so much in advance! :) As for Bill, those of us using C# that MUST use serial ports would like to say, “Thanks for nothing, !@#$%^.....” :mad:
-
Array Of ConstantsMuch appreciated! Thanks again.
-
Array Of ConstantsWhat is the practicle way of assigning an array of const values, such as the followiing code does in Visual C++ (6.0): const double RX_TEST_FREQ[] = {136.15, 155.15, 173.95}; TIA!!!
-
Specifying number of digits after decimal in a fixed-point formatted stringAs always it is very humbling to have the forest pointed out! Thanks for the quick reply. B
-
Specifying number of digits after decimal in a fixed-point formatted stringHi, Does anyone know of a way to specify the number of decimal places in a fixed-point formatted string in C#? This is how I was doing it in VC++(6.0): CString thisString; double val = 12.3456789; thisString.Format(_T("Format to 4 decimal places %.4f"), val); Much thanks for any help! B
-
How to access a control on a form from another class?C# newbie looking for a simple way to access a control on a form, a label or progress bar, from another class. If not a simple, a difficult one, or even the correct one will suffice. BBB