M
MattB
Hello group. I'm new here and to .net (you guys probably never hear that,
right?). I have some development background, so I'm hoping to get up to
speed quickly.
I'm trying to write an ASP.net app using web forms and vb.net that queries a
c++ dll and displays the return nicely. My dll returns a string that is an
ado recordset. I figured this should be easy to parse and bind to a
datagrid, but I keep striking out.
Here's an example of the return string:
OK :<xml xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'
xmlns:rs='urn:schemas-microsoft-com:rowset'
xmlns:z='#RowsetSchema'>
<s:Schema id='RowsetSchema'>
<s:ElementType name='row' content='eltOnly' rs:CommandTimeout='30'>
<s:AttributeType name='guest_no' rs:number='1' rs:writeunknown='true'>
<s:datatype dt:type='number' rs:dbtype='numeric' dt:maxLength='19'
rs:scale='0' rsrecision='17' rs:fixedlength='true'
rs:maybenull='false'/>
</s:AttributeType>
<s:AttributeType name='first_name' rs:number='2' rs:writeunknown='true'>
<s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='15'
rs:maybenull='false'/>
</s:AttributeType>
<s:AttributeType name='last_name' rs:number='3' rs:writeunknown='true'>
<s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='20'
rs:maybenull='false'/>
</s:AttributeType>
<s:AttributeType name='birth_date' rs:number='4' rs:nullable='true'
rs:writeunknown='true'>
<s:datatype dt:type='dateTime' rs:dbtype='timestamp'
dt:maxLength='16' rs:scale='3' rsrecision='23' rs:fixedlength='true'/>
</s:AttributeType>
<s:AttributeType name='phone' rs:number='5' rs:nullable='true'
rs:writeunknown='true'>
<s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='8'
rs:fixedlength='true'/>
</s:AttributeType>
<s:AttributeType name='address' rs:number='6' rs:nullable='true'
rs:writeunknown='true'>
<s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='30'/>
</s:AttributeType>
<s:AttributeType name='city' rs:number='7' rs:nullable='true'
rs:writeunknown='true'>
<s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='25'/>
</s:AttributeType>
<s:AttributeType name='state' rs:number='8' rs:nullable='true'
rs:writeunknown='true'>
<s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='2'
rs:fixedlength='true'/>
</s:AttributeType>
<s:AttributeType name='zip' rs:number='9' rs:nullable='true'
rs:writeunknown='true'>
<s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='10'/>
</s:AttributeType>
<s:extends type='rs:rowbase'/>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row guest_no='16099000' first_name='MATT '
last_name='MESSINGER '/>
</rs:data>
</xml>
I think I'm ok with the 'OK :' at the begining because that would be ignored
when the parsing takes place.
It also looks like the way to go would be DataSet.ReadXML, but I can't get
it to work. In my code behind I have the following in Page_Load:
Dim myDataSet As New DataSet
Dim ox As Object, x As String
ox = CreateObject("ww.main")
x =
ox.invoke("<func>lookupguests</func><first_name>matt</first_name><last_name>
messinger</last_name>")
TEXTAREA1.Value() = x
ox = Nothing
myDataSet.ReadXml(x)
I get my dll output in the text box - so I know it works to populate x, but
doesn't like the myDataSet.ReadXml(x) part. (error is The path is too long
after being fully qualified. - so it's looking for a file instead of a
string)
Can anyone give me an example of how I would need to get this to work, and
how I could then bind that dataset to a grid? Thanks!
right?). I have some development background, so I'm hoping to get up to
speed quickly.
I'm trying to write an ASP.net app using web forms and vb.net that queries a
c++ dll and displays the return nicely. My dll returns a string that is an
ado recordset. I figured this should be easy to parse and bind to a
datagrid, but I keep striking out.
Here's an example of the return string:
OK :<xml xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'
xmlns:rs='urn:schemas-microsoft-com:rowset'
xmlns:z='#RowsetSchema'>
<s:Schema id='RowsetSchema'>
<s:ElementType name='row' content='eltOnly' rs:CommandTimeout='30'>
<s:AttributeType name='guest_no' rs:number='1' rs:writeunknown='true'>
<s:datatype dt:type='number' rs:dbtype='numeric' dt:maxLength='19'
rs:scale='0' rsrecision='17' rs:fixedlength='true'
rs:maybenull='false'/>
</s:AttributeType>
<s:AttributeType name='first_name' rs:number='2' rs:writeunknown='true'>
<s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='15'
rs:maybenull='false'/>
</s:AttributeType>
<s:AttributeType name='last_name' rs:number='3' rs:writeunknown='true'>
<s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='20'
rs:maybenull='false'/>
</s:AttributeType>
<s:AttributeType name='birth_date' rs:number='4' rs:nullable='true'
rs:writeunknown='true'>
<s:datatype dt:type='dateTime' rs:dbtype='timestamp'
dt:maxLength='16' rs:scale='3' rsrecision='23' rs:fixedlength='true'/>
</s:AttributeType>
<s:AttributeType name='phone' rs:number='5' rs:nullable='true'
rs:writeunknown='true'>
<s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='8'
rs:fixedlength='true'/>
</s:AttributeType>
<s:AttributeType name='address' rs:number='6' rs:nullable='true'
rs:writeunknown='true'>
<s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='30'/>
</s:AttributeType>
<s:AttributeType name='city' rs:number='7' rs:nullable='true'
rs:writeunknown='true'>
<s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='25'/>
</s:AttributeType>
<s:AttributeType name='state' rs:number='8' rs:nullable='true'
rs:writeunknown='true'>
<s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='2'
rs:fixedlength='true'/>
</s:AttributeType>
<s:AttributeType name='zip' rs:number='9' rs:nullable='true'
rs:writeunknown='true'>
<s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='10'/>
</s:AttributeType>
<s:extends type='rs:rowbase'/>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row guest_no='16099000' first_name='MATT '
last_name='MESSINGER '/>
</rs:data>
</xml>
I think I'm ok with the 'OK :' at the begining because that would be ignored
when the parsing takes place.
It also looks like the way to go would be DataSet.ReadXML, but I can't get
it to work. In my code behind I have the following in Page_Load:
Dim myDataSet As New DataSet
Dim ox As Object, x As String
ox = CreateObject("ww.main")
x =
ox.invoke("<func>lookupguests</func><first_name>matt</first_name><last_name>
messinger</last_name>")
TEXTAREA1.Value() = x
ox = Nothing
myDataSet.ReadXml(x)
I get my dll output in the text box - so I know it works to populate x, but
doesn't like the myDataSet.ReadXml(x) part. (error is The path is too long
after being fully qualified. - so it's looking for a file instead of a
string)
Can anyone give me an example of how I would need to get this to work, and
how I could then bind that dataset to a grid? Thanks!