OK I have:
Which are the UDTs for my table tblStructures...VB Code:
Public Type gtypStructureProps IsNew As Boolean IsDirty As Boolean IsDeleted As Boolean Key As String * 36 ID As Long Description As String * 30 End Type Public Type gtypStructureData Data As String * 72 End Type
Now, in the load event I have:
My udtData.Data is a string and contains the data from the props UDT, and the debug.print statement proves that it contains the correct data...HOWEVER! When I assign this string to the text property of an XML node all the data vanishes!!!VB Code:
Set adoRec = New Recordset With adoRec .Open strSQL, DB_CONN, adOpenForwardOnly, adLockReadOnly Do While Not .EOF Set objRoot = objDOM.createElement("Structure") udtProps.ID = .Fields("ID").Value udtProps.Description = .Fields("Description").Value udtProps.Key = vbNullString udtProps.IsNew = False udtProps.IsDirty = False udtProps.IsDeleted = False LSet udtData = udtProps Set objProp = objDOM.createElement("UDT") objProp.Text = "Q" & udtData.Data & "P" Debug.Print objProp.Text Debug.Print udtData.Data objRoot.appendChild objProp Set objProp = Nothing
The debug.Print objProp.Text just prints "Q" to the immediate window...the trailing "P" AND all the data vanishes!!!
Is there something up with XML that stops me doing this???
Woka




Reply With Quote