Hi everyone,
I've got a dataset with a records table that is built up from scratch
according to user input. I'm saving this dataset as xml by using
dsRecords.Write Xml(dlgSave.Fil eName,XmlWriteM ode.WriteSchema );
The first problem I had was that all hidden columns (ie: recordID) values
were not written to file. So I set the mapping types of the hidden columns
back to "Element" just before saving.
Now, I read the file back using
dsRecords.ReadX ml(dlgOpen.File Name, XmlReadMode.Rea dSchema);
All is well, I can see all the data that was written to file...Except that,
When I set the column mappings back to hidden ,tell the dataset to
..acceptchanges () and set the .datasource of my datagrid to the Records table
I still see all of the hidden columns. I even tried to set the table
mappings everytime I set the datasource to the datagrid but to no avail.
Any ideas would be appreciated.
Thanks and best regards,
Marco 1 1913
figured it out;
I actualy had to hide the columns inside the datagrid instead of using
datatable.table mappings.
I can really understand why though. I was reading the xmlschema first, then
applying tablestyles to the datatable, then loading the actual data. But
once loaded, the dataset completely ignored the hidden columns. It would be
a nice touch for M$ to add as functionality to the datasets XMLReader
"Marco Martin" <ma**********@s ympatico.ca> wrote in message
news:Tf******** ***********@new s20.bellglobal. com... Hi everyone,
I've got a dataset with a records table that is built up from scratch according to user input. I'm saving this dataset as xml by using dsRecords.Write Xml(dlgSave.Fil eName,XmlWriteM ode.WriteSchema );
The first problem I had was that all hidden columns (ie: recordID) values were not written to file. So I set the mapping types of the hidden
columns back to "Element" just before saving.
Now, I read the file back using
dsRecords.ReadX ml(dlgOpen.File Name, XmlReadMode.Rea dSchema);
All is well, I can see all the data that was written to file...Except
that, When I set the column mappings back to hidden ,tell the dataset to .acceptchanges( ) and set the .datasource of my datagrid to the Records
table I still see all of the hidden columns. I even tried to set the table mappings everytime I set the datasource to the datagrid but to no avail.
Any ideas would be appreciated.
Thanks and best regards,
Marco
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Rami |
last post by:
Dear all,
i would like to ask if it possible to fill a dataset using one stored
procedure,
for example:
we have two tables ( emp ) and ( Dept )
can i use the following stored procedure to fill the dataset
|
by: yaya via DotNetMonster.com |
last post by:
Hi, I'm using OleDb to read an excel files and display the data in a datagrid (using dataset as data source), after modifying the data on datagird, how can I save the changes back into Excel files.
Thankz....
--
Message posted via http://www.dotnetmonster.com
|
by: cvncpu |
last post by:
I have this function:
public string SetUserInfo(string AuthID, DataSet dg2)
{
if (AuthID=="********")
{
Oconn.Open();
da.Update(dg2);
Oconn.Close();
|
by: tomp |
last post by:
Hi,
I am trying to insert a row into the Categories Table in
Nothwinds database in MSDE. I am able to manually insert
it using a query tool.
Using the Debugger, it appears the DataSet loads
correctly, the Data Row is populated correctly, and the
new row is added to the DataSet. But the database is not
updated. What am I missing?
|
by: Fabian |
last post by:
Hello everybody, I would like to know if someone can help me with a DataSet.
In my case the select command that fills the DataSet is a view (sql2000)
that contains 10 tables, I have defined the SQLDataAdapter as follows:
Dim SqlAdapter As New SqlDataAdapter("SELECT * FROM vw_DG_PERSONAS", SqlCon)
En evento Load del Frm tengo esto:
SqlCon.ConnectionString = "Server=" & Svr & _
";Database=dgcontrol;uid=" & Usr & ";pwd=" & Psw & ";"...
| |
by: Diarmuid |
last post by:
I don't understand how I update the table underlying the dataseet
Heres what I have at the moment. In this simple example, it works fine until
I try
adapSimple.Update(dsSimple, "Customers")
What should I be doing instead?
Thanks
Diarmuid
Dim stSQL As String = "SELECT * FROM Customers"
|
by: David |
last post by:
Hi,
using C# 1.1
I am writing a winform app that collects a dataset from a webservice.
At the same time I collect the data, I write the dataset out to the local
disk using DataSet.WriteXml, so that if the webservice is not available,
then the app will continue to run from my saved dataset. If the web service
is not available, then I load the dataset with the ReadXml method.
|
by: Ronald S. Cook |
last post by:
In my client Windows application, I am receiving a DataSet containing one
DataTable. This comes to my client via the business tier on a different
physical machine (we're using WCF if that matters).
After I make changes to the data in the underlying DataTable, I send the
DataSet back to the business tier. In the business tier, what should my
code look like to persist the data up to the database?
I'm assuming I need to do something...
|
by: jonbartlam |
last post by:
Hi There
I'm not sure what exactly is going wrong here. I'm writing an application that retreives a table from a database (tbl_internalfaults) and updates it. (Actually, just the status column will need updating with 'CLOSED' where necessary.)
I have been trying to use the OLEDB command builder to build the statement to update the database however it is returning an error whenever I try to do this.
I already have a dataset full of data, 1...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |