473,789 Members | 2,806 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Load XML from ADO Recordset

Mac
Hi all

I have a asp.net application which calls a web service
via a wdsl file which retrieves an XML String.

The XML String is from a adodb recordset saved as via a
stream.

Dim oRS as New ADODB.Recordset
Dim oStream as New ADODB.Stream
Set oRS = oCnn.Execute(sS QL)
'Save recordset as XML
oRS.Save oStream, adPersistXML
sXML = oStream.ReadTex t

In the ASP.Net application I retrieve the sXML via the
web service without any problems but when I try and load
to an XML document, nothing is loaded.

Dim xmlDoc As New XmlDocument
xmlDoc.LoadXml( sXML)

The xmlDoc remains empty.

I have been scratching my head on this for a couple of
hours and I am sure it's probably simple but would
appreciate any help.

Regards

mac
Nov 18 '05 #1
7 2743
Hi Mac,

Could you give us a little more detail or code?

It would help to have a sample of the string that you are getting into sXML
to analyze why the XML document doesn't like it. I assume that the XML is
well-formed.

How did you test that xmlDoc was empty?

Thanks,

Ken

"Mac" <an*******@disc ussions.microso ft.com> wrote in message
news:05******** *************** *****@phx.gbl.. .
Hi all

I have a asp.net application which calls a web service
via a wdsl file which retrieves an XML String.

The XML String is from a adodb recordset saved as via a
stream.

Dim oRS as New ADODB.Recordset
Dim oStream as New ADODB.Stream
Set oRS = oCnn.Execute(sS QL)
'Save recordset as XML
oRS.Save oStream, adPersistXML
sXML = oStream.ReadTex t

In the ASP.Net application I retrieve the sXML via the
web service without any problems but when I try and load
to an XML document, nothing is loaded.

Dim xmlDoc As New XmlDocument
xmlDoc.LoadXml( sXML)

The xmlDoc remains empty.

I have been scratching my head on this for a couple of
hours and I am sure it's probably simple but would
appreciate any help.

Regards

mac


Nov 18 '05 #2
Hi Ken

Thanks for your reply

I have attached examples of the code and xml that is
produced.

Any help would be really appreciated.

The XML is produced by a VB6 dll on a remote server using
the following code:

Public Function ReturnData() as String
Dim oCnn As New ADODB.Connectio n
Dim oStream As New ADODB.Stream
Dim oRS As New ADODB.Recordset

oCnn.Connection String = SQL_CONNECTION_ STRING
oCnn.Open

oRS.CursorLocat ion = adUseClient
Set oRS = oCnn.Execute("S ELECT .....")

'Save recordset as XML
oRS.Save oStream, adPersistXML

ReturnData = oStream.ReadTex t

Set oStream = Nothing
Set oRS = Nothing
Set oCnn = Nothing
End Function

The XML string is as follows

<xml xmlns:s='uuid:B DC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
xmlns:dt='uuid: C2F41010-65B3-11d1-A29F-
00AA00C14882'
xmlns:rs='urn:s chemas-microsoft-com:rowset'
xmlns:z='#Rowse tSchema'>
<s:Schema id='RowsetSchem a'>
<s:ElementTyp e name='row' content='eltOnl y'
rs:CommandTimeo ut='30'>
<s:AttributeTyp e name='SUN_REGIO N'
rs:number='1'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='4 '
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='SUN_DB'
rs:number='2'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='3 '
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='AMOUNT'
rs:number='3' rs:nullable='tr ue'
rs:writeunknown ='true'>
<s:datatype dt:type='number '
rs:dbtype='nume ric' dt:maxLength='1 9'
rs:scale='3' rs:precision='3 8'
rs:fixedlength= 'true'/>
</s:AttributeType >
<s:AttributeTyp e name='ACCNT_COD E'
rs:number='4' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A0'
rs:number='5' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A1'
rs:number='6' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A2'
rs:number='7' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A3'
rs:number='8' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A4'
rs:number='9' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A5'
rs:number='10' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A6'
rs:number='11' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A7'
rs:number='12' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A8'
rs:number='13' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A9'
rs:number='14' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_T0'
rs:number='15' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:extends type='rs:rowbas e'/>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row SUN_REGION='EME A' SUN_DB='ZZZ'
AMOUNT='1155.00 0'
ACCNT_CODE='105 0 '
ANAL_A0=' '
ANAL_A1=' '
ANAL_A2=' ' ANAL_A3='BS140 '
ANAL_A4=' '
ANAL_A5=' ' ANAL_A6=' '
ANAL_A7=' '
ANAL_A8=' ' ANAL_A9=' '
/>
</rs:data>
</xml>

In the ASP.Net app, I have registered the web service and
in the function call it as follows

Dim sXML as String
Dim xmlDoc As XmlDocument
Dim oWeb As New SoapEMEA.SunLin k
sXML = oWeb.ReturnData ()
'Load XML string into XML Doc
xmlDoc.LoadXml( sXML)

Now I could be really stupid (my girlfriend thinks so)
but I have tested to see if the xmlDoc has any data by
looking at xmlDoc.value.

As far as I can tell, it hasn't been loaded.

Help?

Regards

Ross
-----Original Message-----
Hi Mac,

Could you give us a little more detail or code?

It would help to have a sample of the string that you are getting into sXMLto analyze why the XML document doesn't like it. I assume that the XML iswell-formed.

How did you test that xmlDoc was empty?

Thanks,

Ken

"Mac" <an*******@disc ussions.microso ft.com> wrote in messagenews:05******* *************** ******@phx.gbl. ..
Hi all

I have a asp.net application which calls a web service
via a wdsl file which retrieves an XML String.

The XML String is from a adodb recordset saved as via a
stream.

Dim oRS as New ADODB.Recordset
Dim oStream as New ADODB.Stream
Set oRS = oCnn.Execute(sS QL)
'Save recordset as XML
oRS.Save oStream, adPersistXML
sXML = oStream.ReadTex t

In the ASP.Net application I retrieve the sXML via the
web service without any problems but when I try and load to an XML document, nothing is loaded.

Dim xmlDoc As New XmlDocument
xmlDoc.LoadXml( sXML)

The xmlDoc remains empty.

I have been scratching my head on this for a couple of
hours and I am sure it's probably simple but would
appreciate any help.

Regards

mac


.

Nov 18 '05 #3
Hi Mac,

I was able to emit the XML you provided via a Web service (as a string),
capture it into an XmlDocument and confirm that the XML is in there. I wrote
it to the Output/Debug window.

Here's the code I used:

Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArg s) _
Handles MyBase.Load
Dim strXML As String
Dim xmlws As New xmlsrver
strXML = xmlws.ServeXML
Dim xmlDoc As New XmlDocument
xmlDoc.LoadXml( strXML)
Debug.Write(xml Doc.OuterXml)
End Sub
<an*******@disc ussions.microso ft.com> wrote in message
news:02******** *************** *****@phx.gbl.. .
Hi Ken

Thanks for your reply

I have attached examples of the code and xml that is
produced.

Any help would be really appreciated.

The XML is produced by a VB6 dll on a remote server using
the following code:

Public Function ReturnData() as String
Dim oCnn As New ADODB.Connectio n
Dim oStream As New ADODB.Stream
Dim oRS As New ADODB.Recordset

oCnn.Connection String = SQL_CONNECTION_ STRING
oCnn.Open

oRS.CursorLocat ion = adUseClient
Set oRS = oCnn.Execute("S ELECT .....")

'Save recordset as XML
oRS.Save oStream, adPersistXML

ReturnData = oStream.ReadTex t

Set oStream = Nothing
Set oRS = Nothing
Set oCnn = Nothing
End Function

The XML string is as follows

<xml xmlns:s='uuid:B DC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
xmlns:dt='uuid: C2F41010-65B3-11d1-A29F-
00AA00C14882'
xmlns:rs='urn:s chemas-microsoft-com:rowset'
xmlns:z='#Rowse tSchema'>
<s:Schema id='RowsetSchem a'>
<s:ElementTyp e name='row' content='eltOnl y'
rs:CommandTimeo ut='30'>
<s:AttributeTyp e name='SUN_REGIO N'
rs:number='1'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='4 '
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='SUN_DB'
rs:number='2'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='3 '
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='AMOUNT'
rs:number='3' rs:nullable='tr ue'
rs:writeunknown ='true'>
<s:datatype dt:type='number '
rs:dbtype='nume ric' dt:maxLength='1 9'
rs:scale='3' rs:precision='3 8'
rs:fixedlength= 'true'/>
</s:AttributeType >
<s:AttributeTyp e name='ACCNT_COD E'
rs:number='4' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A0'
rs:number='5' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A1'
rs:number='6' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A2'
rs:number='7' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A3'
rs:number='8' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A4'
rs:number='9' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A5'
rs:number='10' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A6'
rs:number='11' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A7'
rs:number='12' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A8'
rs:number='13' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A9'
rs:number='14' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_T0'
rs:number='15' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:extends type='rs:rowbas e'/>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row SUN_REGION='EME A' SUN_DB='ZZZ'
AMOUNT='1155.00 0'
ACCNT_CODE='105 0 '
ANAL_A0=' '
ANAL_A1=' '
ANAL_A2=' ' ANAL_A3='BS140 '
ANAL_A4=' '
ANAL_A5=' ' ANAL_A6=' '
ANAL_A7=' '
ANAL_A8=' ' ANAL_A9=' '
/>
</rs:data>
</xml>

In the ASP.Net app, I have registered the web service and
in the function call it as follows

Dim sXML as String
Dim xmlDoc As XmlDocument
Dim oWeb As New SoapEMEA.SunLin k
sXML = oWeb.ReturnData ()
'Load XML string into XML Doc
xmlDoc.LoadXml( sXML)

Now I could be really stupid (my girlfriend thinks so)
but I have tested to see if the xmlDoc has any data by
looking at xmlDoc.value.

As far as I can tell, it hasn't been loaded.

Help?

Regards

Ross
-----Original Message-----
Hi Mac,

Could you give us a little more detail or code?

It would help to have a sample of the string that you

are getting into sXML
to analyze why the XML document doesn't like it. I

assume that the XML is
well-formed.

How did you test that xmlDoc was empty?

Thanks,

Ken

"Mac" <an*******@disc ussions.microso ft.com> wrote in

message
news:05****** *************** *******@phx.gbl ...
Hi all

I have a asp.net application which calls a web service
via a wdsl file which retrieves an XML String.

The XML String is from a adodb recordset saved as via a
stream.

Dim oRS as New ADODB.Recordset
Dim oStream as New ADODB.Stream
Set oRS = oCnn.Execute(sS QL)
'Save recordset as XML
oRS.Save oStream, adPersistXML
sXML = oStream.ReadTex t

In the ASP.Net application I retrieve the sXML via the
web service without any problems but when I try and load to an XML document, nothing is loaded.

Dim xmlDoc As New XmlDocument
xmlDoc.LoadXml( sXML)

The xmlDoc remains empty.

I have been scratching my head on this for a couple of
hours and I am sure it's probably simple but would
appreciate any help.

Regards

mac


.


Nov 18 '05 #4
Also, I tried it with and without the XML prologue and it worked.

<?xml version="1.0" encoding="utf-8" ?>

<an*******@disc ussions.microso ft.com> wrote in message
news:02******** *************** *****@phx.gbl.. .
Hi Ken

Thanks for your reply

I have attached examples of the code and xml that is
produced.

Any help would be really appreciated.

The XML is produced by a VB6 dll on a remote server using
the following code:

Public Function ReturnData() as String
Dim oCnn As New ADODB.Connectio n
Dim oStream As New ADODB.Stream
Dim oRS As New ADODB.Recordset

oCnn.Connection String = SQL_CONNECTION_ STRING
oCnn.Open

oRS.CursorLocat ion = adUseClient
Set oRS = oCnn.Execute("S ELECT .....")

'Save recordset as XML
oRS.Save oStream, adPersistXML

ReturnData = oStream.ReadTex t

Set oStream = Nothing
Set oRS = Nothing
Set oCnn = Nothing
End Function

The XML string is as follows

<xml xmlns:s='uuid:B DC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
xmlns:dt='uuid: C2F41010-65B3-11d1-A29F-
00AA00C14882'
xmlns:rs='urn:s chemas-microsoft-com:rowset'
xmlns:z='#Rowse tSchema'>
<s:Schema id='RowsetSchem a'>
<s:ElementTyp e name='row' content='eltOnl y'
rs:CommandTimeo ut='30'>
<s:AttributeTyp e name='SUN_REGIO N'
rs:number='1'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='4 '
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='SUN_DB'
rs:number='2'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='3 '
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='AMOUNT'
rs:number='3' rs:nullable='tr ue'
rs:writeunknown ='true'>
<s:datatype dt:type='number '
rs:dbtype='nume ric' dt:maxLength='1 9'
rs:scale='3' rs:precision='3 8'
rs:fixedlength= 'true'/>
</s:AttributeType >
<s:AttributeTyp e name='ACCNT_COD E'
rs:number='4' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A0'
rs:number='5' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A1'
rs:number='6' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A2'
rs:number='7' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A3'
rs:number='8' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A4'
rs:number='9' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A5'
rs:number='10' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A6'
rs:number='11' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A7'
rs:number='12' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A8'
rs:number='13' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A9'
rs:number='14' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_T0'
rs:number='15' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:extends type='rs:rowbas e'/>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row SUN_REGION='EME A' SUN_DB='ZZZ'
AMOUNT='1155.00 0'
ACCNT_CODE='105 0 '
ANAL_A0=' '
ANAL_A1=' '
ANAL_A2=' ' ANAL_A3='BS140 '
ANAL_A4=' '
ANAL_A5=' ' ANAL_A6=' '
ANAL_A7=' '
ANAL_A8=' ' ANAL_A9=' '
/>
</rs:data>
</xml>

In the ASP.Net app, I have registered the web service and
in the function call it as follows

Dim sXML as String
Dim xmlDoc As XmlDocument
Dim oWeb As New SoapEMEA.SunLin k
sXML = oWeb.ReturnData ()
'Load XML string into XML Doc
xmlDoc.LoadXml( sXML)

Now I could be really stupid (my girlfriend thinks so)
but I have tested to see if the xmlDoc has any data by
looking at xmlDoc.value.

As far as I can tell, it hasn't been loaded.

Help?

Regards

Ross
-----Original Message-----
Hi Mac,

Could you give us a little more detail or code?

It would help to have a sample of the string that you

are getting into sXML
to analyze why the XML document doesn't like it. I

assume that the XML is
well-formed.

How did you test that xmlDoc was empty?

Thanks,

Ken

"Mac" <an*******@disc ussions.microso ft.com> wrote in

message
news:05****** *************** *******@phx.gbl ...
Hi all

I have a asp.net application which calls a web service
via a wdsl file which retrieves an XML String.

The XML String is from a adodb recordset saved as via a
stream.

Dim oRS as New ADODB.Recordset
Dim oStream as New ADODB.Stream
Set oRS = oCnn.Execute(sS QL)
'Save recordset as XML
oRS.Save oStream, adPersistXML
sXML = oStream.ReadTex t

In the ASP.Net application I retrieve the sXML via the
web service without any problems but when I try and load to an XML document, nothing is loaded.

Dim xmlDoc As New XmlDocument
xmlDoc.LoadXml( sXML)

The xmlDoc remains empty.

I have been scratching my head on this for a couple of
hours and I am sure it's probably simple but would
appreciate any help.

Regards

mac


.


Nov 18 '05 #5
Hi Mac,

I was able to emit the XML you provided via a Web service (as a string),
capture it into an XmlDocument and confirm that the XML is in there. I wrote
it to the Output/Debug window.

Here's the code I used:

Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArg s) _
Handles MyBase.Load
Dim strXML As String
Dim xmlws As New xmlsrver
strXML = xmlws.ServeXML
Dim xmlDoc As New XmlDocument
xmlDoc.LoadXml( strXML)
Debug.Write(xml Doc.OuterXml)
End Sub
<an*******@disc ussions.microso ft.com> wrote in message
news:02******** *************** *****@phx.gbl.. .
Hi Ken

Thanks for your reply

I have attached examples of the code and xml that is
produced.

Any help would be really appreciated.

The XML is produced by a VB6 dll on a remote server using
the following code:

Public Function ReturnData() as String
Dim oCnn As New ADODB.Connectio n
Dim oStream As New ADODB.Stream
Dim oRS As New ADODB.Recordset

oCnn.Connection String = SQL_CONNECTION_ STRING
oCnn.Open

oRS.CursorLocat ion = adUseClient
Set oRS = oCnn.Execute("S ELECT .....")

'Save recordset as XML
oRS.Save oStream, adPersistXML

ReturnData = oStream.ReadTex t

Set oStream = Nothing
Set oRS = Nothing
Set oCnn = Nothing
End Function

The XML string is as follows

<xml xmlns:s='uuid:B DC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
xmlns:dt='uuid: C2F41010-65B3-11d1-A29F-
00AA00C14882'
xmlns:rs='urn:s chemas-microsoft-com:rowset'
xmlns:z='#Rowse tSchema'>
<s:Schema id='RowsetSchem a'>
<s:ElementTyp e name='row' content='eltOnl y'
rs:CommandTimeo ut='30'>
<s:AttributeTyp e name='SUN_REGIO N'
rs:number='1'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='4 '
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='SUN_DB'
rs:number='2'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='3 '
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='AMOUNT'
rs:number='3' rs:nullable='tr ue'
rs:writeunknown ='true'>
<s:datatype dt:type='number '
rs:dbtype='nume ric' dt:maxLength='1 9'
rs:scale='3' rs:precision='3 8'
rs:fixedlength= 'true'/>
</s:AttributeType >
<s:AttributeTyp e name='ACCNT_COD E'
rs:number='4' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A0'
rs:number='5' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A1'
rs:number='6' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A2'
rs:number='7' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A3'
rs:number='8' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A4'
rs:number='9' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A5'
rs:number='10' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A6'
rs:number='11' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A7'
rs:number='12' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A8'
rs:number='13' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A9'
rs:number='14' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_T0'
rs:number='15' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:extends type='rs:rowbas e'/>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row SUN_REGION='EME A' SUN_DB='ZZZ'
AMOUNT='1155.00 0'
ACCNT_CODE='105 0 '
ANAL_A0=' '
ANAL_A1=' '
ANAL_A2=' ' ANAL_A3='BS140 '
ANAL_A4=' '
ANAL_A5=' ' ANAL_A6=' '
ANAL_A7=' '
ANAL_A8=' ' ANAL_A9=' '
/>
</rs:data>
</xml>

In the ASP.Net app, I have registered the web service and
in the function call it as follows

Dim sXML as String
Dim xmlDoc As XmlDocument
Dim oWeb As New SoapEMEA.SunLin k
sXML = oWeb.ReturnData ()
'Load XML string into XML Doc
xmlDoc.LoadXml( sXML)

Now I could be really stupid (my girlfriend thinks so)
but I have tested to see if the xmlDoc has any data by
looking at xmlDoc.value.

As far as I can tell, it hasn't been loaded.

Help?

Regards

Ross
-----Original Message-----
Hi Mac,

Could you give us a little more detail or code?

It would help to have a sample of the string that you

are getting into sXML
to analyze why the XML document doesn't like it. I

assume that the XML is
well-formed.

How did you test that xmlDoc was empty?

Thanks,

Ken

"Mac" <an*******@disc ussions.microso ft.com> wrote in

message
news:05****** *************** *******@phx.gbl ...
Hi all

I have a asp.net application which calls a web service
via a wdsl file which retrieves an XML String.

The XML String is from a adodb recordset saved as via a
stream.

Dim oRS as New ADODB.Recordset
Dim oStream as New ADODB.Stream
Set oRS = oCnn.Execute(sS QL)
'Save recordset as XML
oRS.Save oStream, adPersistXML
sXML = oStream.ReadTex t

In the ASP.Net application I retrieve the sXML via the
web service without any problems but when I try and load to an XML document, nothing is loaded.

Dim xmlDoc As New XmlDocument
xmlDoc.LoadXml( sXML)

The xmlDoc remains empty.

I have been scratching my head on this for a couple of
hours and I am sure it's probably simple but would
appreciate any help.

Regards

mac


.


Nov 18 '05 #6
Also, I tried it with and without the XML prologue and it worked.

<?xml version="1.0" encoding="utf-8" ?>

<an*******@disc ussions.microso ft.com> wrote in message
news:02******** *************** *****@phx.gbl.. .
Hi Ken

Thanks for your reply

I have attached examples of the code and xml that is
produced.

Any help would be really appreciated.

The XML is produced by a VB6 dll on a remote server using
the following code:

Public Function ReturnData() as String
Dim oCnn As New ADODB.Connectio n
Dim oStream As New ADODB.Stream
Dim oRS As New ADODB.Recordset

oCnn.Connection String = SQL_CONNECTION_ STRING
oCnn.Open

oRS.CursorLocat ion = adUseClient
Set oRS = oCnn.Execute("S ELECT .....")

'Save recordset as XML
oRS.Save oStream, adPersistXML

ReturnData = oStream.ReadTex t

Set oStream = Nothing
Set oRS = Nothing
Set oCnn = Nothing
End Function

The XML string is as follows

<xml xmlns:s='uuid:B DC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
xmlns:dt='uuid: C2F41010-65B3-11d1-A29F-
00AA00C14882'
xmlns:rs='urn:s chemas-microsoft-com:rowset'
xmlns:z='#Rowse tSchema'>
<s:Schema id='RowsetSchem a'>
<s:ElementTyp e name='row' content='eltOnl y'
rs:CommandTimeo ut='30'>
<s:AttributeTyp e name='SUN_REGIO N'
rs:number='1'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='4 '
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='SUN_DB'
rs:number='2'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='3 '
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='AMOUNT'
rs:number='3' rs:nullable='tr ue'
rs:writeunknown ='true'>
<s:datatype dt:type='number '
rs:dbtype='nume ric' dt:maxLength='1 9'
rs:scale='3' rs:precision='3 8'
rs:fixedlength= 'true'/>
</s:AttributeType >
<s:AttributeTyp e name='ACCNT_COD E'
rs:number='4' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A0'
rs:number='5' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A1'
rs:number='6' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A2'
rs:number='7' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A3'
rs:number='8' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A4'
rs:number='9' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A5'
rs:number='10' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A6'
rs:number='11' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A7'
rs:number='12' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A8'
rs:number='13' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A9'
rs:number='14' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_T0'
rs:number='15' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:extends type='rs:rowbas e'/>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row SUN_REGION='EME A' SUN_DB='ZZZ'
AMOUNT='1155.00 0'
ACCNT_CODE='105 0 '
ANAL_A0=' '
ANAL_A1=' '
ANAL_A2=' ' ANAL_A3='BS140 '
ANAL_A4=' '
ANAL_A5=' ' ANAL_A6=' '
ANAL_A7=' '
ANAL_A8=' ' ANAL_A9=' '
/>
</rs:data>
</xml>

In the ASP.Net app, I have registered the web service and
in the function call it as follows

Dim sXML as String
Dim xmlDoc As XmlDocument
Dim oWeb As New SoapEMEA.SunLin k
sXML = oWeb.ReturnData ()
'Load XML string into XML Doc
xmlDoc.LoadXml( sXML)

Now I could be really stupid (my girlfriend thinks so)
but I have tested to see if the xmlDoc has any data by
looking at xmlDoc.value.

As far as I can tell, it hasn't been loaded.

Help?

Regards

Ross
-----Original Message-----
Hi Mac,

Could you give us a little more detail or code?

It would help to have a sample of the string that you

are getting into sXML
to analyze why the XML document doesn't like it. I

assume that the XML is
well-formed.

How did you test that xmlDoc was empty?

Thanks,

Ken

"Mac" <an*******@disc ussions.microso ft.com> wrote in

message
news:05****** *************** *******@phx.gbl ...
Hi all

I have a asp.net application which calls a web service
via a wdsl file which retrieves an XML String.

The XML String is from a adodb recordset saved as via a
stream.

Dim oRS as New ADODB.Recordset
Dim oStream as New ADODB.Stream
Set oRS = oCnn.Execute(sS QL)
'Save recordset as XML
oRS.Save oStream, adPersistXML
sXML = oStream.ReadTex t

In the ASP.Net application I retrieve the sXML via the
web service without any problems but when I try and load to an XML document, nothing is loaded.

Dim xmlDoc As New XmlDocument
xmlDoc.LoadXml( sXML)

The xmlDoc remains empty.

I have been scratching my head on this for a couple of
hours and I am sure it's probably simple but would
appreciate any help.

Regards

mac


.


Nov 18 '05 #7
Mac

Hi Ken

Thanks for your reply. If anything has come out of this
is that I now know how to check an XML document in .net.

Thanks for your time, it is appreciated

Mac
-----Original Message-----
Hi Mac,

I was able to emit the XML you provided via a Web service (as a string),capture it into an XmlDocument and confirm that the XML is in there. I wroteit to the Output/Debug window.

Here's the code I used:

Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArg s) _
Handles MyBase.Load
Dim strXML As String
Dim xmlws As New xmlsrver
strXML = xmlws.ServeXML
Dim xmlDoc As New XmlDocument
xmlDoc.LoadXml( strXML)
Debug.Write(xml Doc.OuterXml)
End Sub
<an*******@dis cussions.micros oft.com> wrote in message
news:02******* *************** ******@phx.gbl. ..
Hi Ken

Thanks for your reply

I have attached examples of the code and xml that is
produced.

Any help would be really appreciated.

The XML is produced by a VB6 dll on a remote server using the following code:

Public Function ReturnData() as String
Dim oCnn As New ADODB.Connectio n
Dim oStream As New ADODB.Stream
Dim oRS As New ADODB.Recordset

oCnn.Connection String = SQL_CONNECTION_ STRING
oCnn.Open

oRS.CursorLocat ion = adUseClient
Set oRS = oCnn.Execute("S ELECT .....")

'Save recordset as XML
oRS.Save oStream, adPersistXML

ReturnData = oStream.ReadTex t

Set oStream = Nothing
Set oRS = Nothing
Set oCnn = Nothing
End Function

The XML string is as follows

<xml xmlns:s='uuid:B DC6E3F0-6DA3-11d1-A2A3- 00AA00C14882' xmlns:dt='uuid: C2F41010-65B3-11d1-A29F-
00AA00C14882'
xmlns:rs='urn:s chemas-microsoft-com:rowset'
xmlns:z='#Rowse tSchema'>
<s:Schema id='RowsetSchem a'>
<s:ElementTyp e name='row' content='eltOnl y'
rs:CommandTimeo ut='30'>
<s:AttributeTyp e name='SUN_REGIO N'
rs:number='1'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='4 '
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='SUN_DB'
rs:number='2'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='3 '
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='AMOUNT'
rs:number='3' rs:nullable='tr ue'
rs:writeunknown ='true'>
<s:datatype dt:type='number '
rs:dbtype='nume ric' dt:maxLength='1 9'
rs:scale='3' rs:precision='3 8'
rs:fixedlength= 'true'/>
</s:AttributeType >
<s:AttributeTyp e name='ACCNT_COD E'
rs:number='4' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A0'
rs:number='5' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A1'
rs:number='6' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A2'
rs:number='7' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A3'
rs:number='8' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A4'
rs:number='9' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A5'
rs:number='10' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A6'
rs:number='11' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A7'
rs:number='12' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A8'
rs:number='13' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_A9'
rs:number='14' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:AttributeTyp e name='ANAL_T0'
rs:number='15' rs:writeunknown ='true'>
<s:datatype dt:type='string '
rs:dbtype='str' dt:maxLength='1 5'
rs:fixedlength= 'true'
rs:maybenull='f alse'/>
</s:AttributeType >
<s:extends type='rs:rowbas e'/>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row SUN_REGION='EME A' SUN_DB='ZZZ'
AMOUNT='1155.00 0'
ACCNT_CODE='105 0 '
ANAL_A0=' '
ANAL_A1=' '
ANAL_A2=' ' ANAL_A3='BS140 '
ANAL_A4=' '
ANAL_A5=' ' ANAL_A6=' '
ANAL_A7=' '
ANAL_A8=' ' ANAL_A9=' '
/>
</rs:data>
</xml>

In the ASP.Net app, I have registered the web service and in the function call it as follows

Dim sXML as String
Dim xmlDoc As XmlDocument
Dim oWeb As New SoapEMEA.SunLin k
sXML = oWeb.ReturnData ()
'Load XML string into XML Doc
xmlDoc.LoadXml( sXML)

Now I could be really stupid (my girlfriend thinks so)
but I have tested to see if the xmlDoc has any data by
looking at xmlDoc.value.

As far as I can tell, it hasn't been loaded.

Help?

Regards

Ross
-----Original Message-----
Hi Mac,

Could you give us a little more detail or code?

It would help to have a sample of the string that you

are getting into sXML
to analyze why the XML document doesn't like it. I

assume that the XML is
well-formed.

How did you test that xmlDoc was empty?

Thanks,

Ken

"Mac" <an*******@disc ussions.microso ft.com> wrote in

message
news:05***** *************** ********@phx.gb l...
Hi all

I have a asp.net application which calls a web service via a wdsl file which retrieves an XML String.

The XML String is from a adodb recordset saved as via a stream.

Dim oRS as New ADODB.Recordset
Dim oStream as New ADODB.Stream
Set oRS = oCnn.Execute(sS QL)
'Save recordset as XML
oRS.Save oStream, adPersistXML
sXML = oStream.ReadTex t

In the ASP.Net application I retrieve the sXML via the web service without any problems but when I try and

load
to an XML document, nothing is loaded.

Dim xmlDoc As New XmlDocument
xmlDoc.LoadXml( sXML)

The xmlDoc remains empty.

I have been scratching my head on this for a couple of hours and I am sure it's probably simple but would
appreciate any help.

Regards

mac

.


.

Nov 18 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3094
by: Tom | last post by:
I want to open a recordset object on an .asp page. When I open the recordset I would like to use a stored procedure that expects a parameter to be passed for the stored procedure. I will then use the recordset to loop thru the recordset, update values from the recordset and then update the database by passing parmeters to another stored procedure. I would like to use the recordset object but can it be used to pass a parameter to a stored...
9
21652
by: John Kirksey | last post by:
I have a page that uses an in-place editable DataGrid that supports sorting and paging. EnableViewState is turned ON. At the top of the page are several search fields that allow the user to filter the results in the grid. Say you filter the grid for records that have a certain condition set to "NO" (in this case a checkbox). In this scenario the search returns one result. If I then check the checkbox ("YES") and save it, I now get my message...
5
1455
by: ZaphodBBB | last post by:
I have a form that is used just to review previously saved records.(1 record at a time). It also allows just a couple of fields to be updatable (in a given record)and resaved. I load all the text boxes in this this form simply by creating a recordset in the forms Load event procedure. It then populates the fields using... say . This works fine. But in the table that the recordsourse draws from there is only a customerID field and no...
6
3600
by: hturk | last post by:
How can I load files on a file server that have many different types of files into a table. The files include: Word, Excel Powerpoint, Outlook emails, bmp, gif, tif, jpg, c++, etc. I would like to display the icons of thes objects through an OLE bound control on a form. I can load them individually by hand, but when you have thousands of them to load it would be easier to loop through them and embed them in the table with the class name. ...
10
15334
by: sara | last post by:
Hi - I have been struggling with solution ideas for this now for almost 2 weeks, and have not been able to figure this out. I have a user who creates a Purchase Order (tblPOData). In some circumstances, this or another user must create an invoice to go with the PO (I know - that makes no sense, but this is the business case). I have the user go to a form to create the invoice:
2
7653
by: john0600 | last post by:
I'm writing a web service in .NET to work with Delphi clients. Delphi uses ADO so I want to convert the Dataset to a Recordset and vice- versa. It appears a Web Service cannot publish a web method with a Recordset return so I save the RecordSet to an XML string: SqlDataAdapter sa = new SqlDataAdapter("Select * FROM " + table , oConn); DataSet ds = new DataSet();
3
2204
by: Codebug | last post by:
Trying to load a query in Access 2003 as a recordset, returns error 3061, too few parameters, Expected 1. Dim StrSQL As String Dim rs As DAO.Recordset Dim db As DAO.Database StrSQL = "<some_SQL_Statement>" Set db = CurrentDb()
0
5512
by: MBD | last post by:
Hi, I have been loading a 500,000 recordset Table in DB2 using (LOAD...REPLACE INTO). It took me about 30 seconds on our robust server. So, When using (LOAD...INSERT INTO) it will take the same 30 seconds for the first load (loading into an empty table). When Loading again (Loading into a table filled with 500,000 recordssets) it took so long time that I just gave up after 30 minutes. The Manage Utility of DB2 Control Center shows after...
1
2093
by: Tomino | last post by:
Hi all, I have a sticky question, it's killing me for weeks so i hope to find the answer here. I have a query to filter records from a table. From these results I want to edit the records with recordset, to make a recordset works fine, but to edit one made me an old man ... :-( Can somebody please tell me how to edit records with a recordset? The meaning is that I load the records in a subform on my existing form where the user can edit the...
0
9511
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,...
0
10412
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10200
jinu1996
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...
0
9986
tracyyun
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...
1
7529
isladogs
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...
0
6769
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();...
0
5422
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4093
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.