EDN Admin
Well-known member
How change a ADODB.RecordSet field writeable?
VBCode
Private Sub Command1_Click()
Dim rs As New ADODB.Recordset
rs.Open "C:0000000010data.xml", , adOpenStatic, adLockOptimistic
rs.Fields("PictureID").Value = "adfa"
End Sub
Data Source is a xml file
Error xmlFile:
<xml xmlns:s=uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882
<span style="white-spacere xmlns:dt=uuid:C2F41010-65B3-11d1-A29F-00AA00C14882
<span style="white-spacere xmlns:rs=urn:schemas-microsoft-com:rowset
<span style="white-spacere xmlns:z=#RowsetSchema>
<s:Schema id=RowsetSchema>
<span style="white-spacere <s:ElementType name=row content=eltOnly>
<span style="white-spacere <s:AttributeType name=PictureID rs:number=1 rs:nullable=true>
<span style="white-spacere <s:datatype dt:type=string rs:dbtype=str dt:maxLength=54/>
<span style="white-spacere </s:AttributeType>
<span style="white-spacere </s:ElementType>
</s:Schema>
<rs:data>
<span style="white-spacere <z:row PictureID=Test.tif/>
</rs:data>
</xml>
Correct xml
<xml xmlns:s=uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882
<span style="white-spacere xmlns:dt=uuid:C2F41010-65B3-11d1-A29F-00AA00C14882
<span style="white-spacere xmlns:rs=urn:schemas-microsoft-com:rowset
<span style="white-spacere xmlns:z=#RowsetSchema>
<s:Schema id=RowsetSchema>
<span style="white-spacere <s:ElementType name=row content=eltOnly>
<span style="white-spacere <s:AttributeType name=PictureID rs:number=1 rs:nullable=true rs:writeunknown="true" >
<span style="white-spacere <s:datatype dt:type=string rs:dbtype=str dt:maxLength=54/>
<span style="white-spacere </s:AttributeType>
<span style="white-spacere </s:ElementType>
</s:Schema>
<rs:data>
<span style="white-spacere <z:row PictureID=Test.tif/>
</rs:data>
</xml>
rs:writeunknown="true" Attribute miss
View the full article
VBCode
Private Sub Command1_Click()
Dim rs As New ADODB.Recordset
rs.Open "C:0000000010data.xml", , adOpenStatic, adLockOptimistic
rs.Fields("PictureID").Value = "adfa"
End Sub
Data Source is a xml file
Error xmlFile:
<xml xmlns:s=uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882
<span style="white-spacere xmlns:dt=uuid:C2F41010-65B3-11d1-A29F-00AA00C14882
<span style="white-spacere xmlns:rs=urn:schemas-microsoft-com:rowset
<span style="white-spacere xmlns:z=#RowsetSchema>
<s:Schema id=RowsetSchema>
<span style="white-spacere <s:ElementType name=row content=eltOnly>
<span style="white-spacere <s:AttributeType name=PictureID rs:number=1 rs:nullable=true>
<span style="white-spacere <s:datatype dt:type=string rs:dbtype=str dt:maxLength=54/>
<span style="white-spacere </s:AttributeType>
<span style="white-spacere </s:ElementType>
</s:Schema>
<rs:data>
<span style="white-spacere <z:row PictureID=Test.tif/>
</rs:data>
</xml>
Correct xml
<xml xmlns:s=uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882
<span style="white-spacere xmlns:dt=uuid:C2F41010-65B3-11d1-A29F-00AA00C14882
<span style="white-spacere xmlns:rs=urn:schemas-microsoft-com:rowset
<span style="white-spacere xmlns:z=#RowsetSchema>
<s:Schema id=RowsetSchema>
<span style="white-spacere <s:ElementType name=row content=eltOnly>
<span style="white-spacere <s:AttributeType name=PictureID rs:number=1 rs:nullable=true rs:writeunknown="true" >
<span style="white-spacere <s:datatype dt:type=string rs:dbtype=str dt:maxLength=54/>
<span style="white-spacere </s:AttributeType>
<span style="white-spacere </s:ElementType>
</s:Schema>
<rs:data>
<span style="white-spacere <z:row PictureID=Test.tif/>
</rs:data>
</xml>
rs:writeunknown="true" Attribute miss
View the full article