WriteToXML function ???

G

Guest

Dear all,

I have a dataSet based on one table object of 6 columns, with the last
columns which allows to get null field.


Then this dataset is bind to a datagrid.
All columns are readonly except the last one for which I have autorise null
field.
Then I am able to enter some text through datagrid inside this last column,
for a particular row.

SO far so good.
After this I am able to send the content of the dataset to XML file susing
the WriteToXML function. When file is generated, I notice that the last
column of my dataset table is not written inside generated XML file

I have checked the dataset structure which is suppose to be send to file,
and I can see my last colum in its structure

Why this last column is not written to XML file ?
When editing directly a cell inside a datagrid, does the change is directly
apply to the dataset table as it is bind ?

thnaks for your help
regards
serge
 
G

Guest

Here is the function
======================

Public Function WriteToXMLLog(ByVal dsView As DataSet) As Boolean

'---------------------------------------------------------------------
' Name : WriteToLog
' Purpose : Write string to log file
' Param : sData, string to be written
' Return : true is succeed

'---------------------------------------------------------------------
Dim m_objds As DataSet

Try

m_objds = dsView

'- retrive file path
m_sFilePath = m_sOrgLogFilePath & "\" & m_objds.DataSetName

'Select Case m_LogFileType
' Case LogFileFormat.Csv : m_sFilePath = m_sFilePath &
"\Csv"
' Case LogFileFormat.Xml : m_sFilePath = m_sFilePath &
"\Xml"
'End Select

If Dir$(m_sFilePath, FileAttribute.Directory) = "" Then
MkDir(m_sFilePath)
m_objds.WriteXml(m_sFilePath & "\" & m_sFileName)

Catch exc As IOException
m_ObjMessageInfo.Severity = TraceLevel.Error
m_ObjMessageInfo.Number = 2
m_ObjMessageInfo.Message = "WriteToLog()"
m_ObjMessage.DisplayMessage(m_objAssembly, m_ObjMessageInfo,
m_ObjMessage.TypeMessage.ErrorMessage)

Catch exc As Xml.XmlException
m_ObjMessage.DisplayExceptionInfo(m_objAssembly, exc)

Catch exc As Exception
m_ObjMessage.DisplayExceptionInfo(m_objAssembly, exc)

End Try
End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top