table_to_xml command isn"t working

table_to_xml command isn"t working

am 27.11.2007 16:51:54 von Luigi Pirillo

This is a multi-part message in MIME format.

------=_NextPart_000_0000_01C83115.D287F9A0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hello,



I have registered an odbc entry (named xfpdb) on my Windows XP Pro machine
using PosgreSQL Ansi vers. 8.02.05 (my db server is 8.3 beta 1).

Using a simple VB 6.0 code, I have tried to connect to it and return some
XML information using ADO as in the following:



..

cn.Open "Provider=MSDASQL.1;Persist Security Info=False;Data
Source=xfpdb"

rs.Open "select * from table_to_xml('""Versions""', true, true, '')", cn


MsgBox rs.Fields(0).Value

..



The returned XML string appears truncated, as shown below:

------------------------------------------------------------ ----------------
---------------------------





962

0.0.0.0

600

2007-11-13T11:19:28.20









963

0.0.0.1

600

2007-11-13T11:19:38.50









964

0.0.0.2

600

2007-11-13T11:19:38.50









965

0.0.0.3

600

2007-11-13T11:19:38.50
------------------------------------------------------------ ----------------
---------------------------



Same result using Labview 8.2.1 and its database connectivity tool.



But if I try to execute the query directly using pg Admin III, the XML
output is correct, as shown below:



------------------------------------------------------------ ----------------
---------------------------





962

0.0.0.0

600

2007-11-13T11:19:28.20









963

0.0.0.1

600

2007-11-13T11:19:38.50









964

0.0.0.2

600

2007-11-13T11:19:38.50









965

0.0.0.3

600

2007-11-13T11:19:38.50



------------------------------------------------------------ ----------------
---------------------------



Can anyone help me?



Thanks in advance,



Luigi












------=_NextPart_000_0000_01C83115.D287F9A0
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:st1=3D"urn:schemas-microsoft-com:office:smarttags" =
xmlns=3D"http://www.w3.org/TR/REC-html40">


charset=3Dus-ascii">

namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
name=3D"City"/>
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
name=3D"place"/>









style=3D'font-size:10.0pt;
font-family:Arial'>Hello,



style=3D'font-size:10.0pt;
font-family:Arial'> 



style=3D'font-size:
10.0pt;font-family:Arial'>I have registered an odbc entry (named xfpdb) =
on my
Windows XP Pro machine using PosgreSQL Ansi vers. 8.02.05 (my db server =
is 8.3 beta
1).



style=3D'font-size:
10.0pt;font-family:Arial'>Using a simple VB 6.0 code, I have tried to =
connect
to it and return some XML information using w:st=3D"on"> w:st=3D"on">ADO as in the =
following:



style=3D'font-size:
10.0pt;font-family:Arial'> 



style=3D'font-size:
10.0pt;font-family:Arial'>    =
….



style=3D'font-size:
10.0pt;font-family:Arial'>    cn.Open =
"Provider=3DMSDASQL.1;Persist Security
Info=3DFalse;Data Source=3Dxfpdb"



style=3D'font-size:
10.0pt;font-family:Arial'>    rs.Open "select * from
table_to_xml('""Versions""', true, true, '')", =
cn



style=3D'font-size:
10.0pt;font-family:Arial'>    MsgBox =
rs.Fields(0).Value



style=3D'font-size:
10.0pt;font-family:Arial'>    =
……



style=3D'font-size:
10.0pt;font-family:Arial'> 



style=3D'font-size:
10.0pt;font-family:Arial'>The returned XML string appears truncated, as =
shown below:



style=3D'font-size:
10.0pt;font-family:Arial'>---------------------------------- -------------=
-------------------------------------------------------- >



style=3D'font-size:
10.0pt;font-family:Arial'><Versions
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"> >



style=3D'font-size:
10.0pt;font-family:Arial'> 



style=3D'font-size:
10.0pt;font-family:Arial'>  =
<Version_Id>962</Version_Id>



style=3D'font-size:
10.0pt;font-family:Arial'>  =
<Version>0.0.0.0</Version>



style=3D'font-size:
10.0pt;font-family:Arial'>  =
<Process_Id>600</Process_Id>



style=3D'font-size:
10.0pt;font-family:Arial'> 
<CreatedDateTime>2007-11-13T11:19:28.20</CreatedDateTime> >



style=3D'font-size:
10.0pt;font-family:Arial'></Versions>



style=3D'font-size:
10.0pt;font-family:Arial'> 



style=3D'font-size:
10.0pt;font-family:Arial'><Versions
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"> >



style=3D'font-size:
10.0pt;font-family:Arial'> 



style=3D'font-size:
10.0pt;font-family:Arial'>  =
<Version_Id>963</Version_Id>



style=3D'font-size:
10.0pt;font-family:Arial'>  =
<Version>0.0.0.1</Version>



style=3D'font-size:
10.0pt;font-family:Arial'>  =
<Process_Id>600</Process_Id>



style=3D'font-size:
10.0pt;font-family:Arial'> 
<CreatedDateTime>2007-11-13T11:19:38.50</CreatedDateTime> >



style=3D'font-size:
10.0pt;font-family:Arial'></Versions>



style=3D'font-size:
10.0pt;font-family:Arial'> 



style=3D'font-size:
10.0pt;font-family:Arial'><Versions =
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"> >



style=3D'font-size:
10.0pt;font-family:Arial'> 



style=3D'font-size:
10.0pt;font-family:Arial'>  =
<Version_Id>964</Version_Id>



style=3D'font-size:
10.0pt;font-family:Arial'>  =
<Version>0.0.0.2</Version>



style=3D'font-size:
10.0pt;font-family:Arial'>  =
<Process_Id>600</Process_Id>



style=3D'font-size:
10.0pt;font-family:Arial'> 
<CreatedDateTime>2007-11-13T11:19:38.50</CreatedDateTime> >



style=3D'font-size:
10.0pt;font-family:Arial'></Versions>



style=3D'font-size:
10.0pt;font-family:Arial'> 



style=3D'font-size:
10.0pt;font-family:Arial'><Versions
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"> >



style=3D'font-size:
10.0pt;font-family:Arial'> 



style=3D'font-size:
10.0pt;font-family:Arial'>  =
<Version_Id>965</Version_Id>



style=3D'font-size:
10.0pt;font-family:Arial'>  =
<Version>0.0.0.3</Version>



style=3D'font-size:
10.0pt;font-family:Arial'>  =
<Process_Id>600</Process_Id>



style=3D'font-size:
10.0pt;font-family:Arial'> 
<CreatedDateTime>2007-11-13T11:19:38.50</C   &nbs=
p;            =
;    @ 



style=3D'font-size:
10.0pt;font-family:Arial'>---------------------------------- -------------=
-------------------------------------------------------- >



style=3D'font-size:
10.0pt;font-family:Arial'> 



style=3D'font-size:
10.0pt;font-family:Arial'>Same result using Labview 8.2.1 and its =
database connectivity
tool.



style=3D'font-size:
10.0pt;font-family:Arial'> 



style=3D'font-size:
10.0pt;font-family:Arial'>But if I try to execute the query directly =
using pg Admin
III, the XML output is correct, as shown =
below:



style=3D'font-size:
10.0pt;font-family:Arial'> 



style=3D'font-size:
10.0pt;font-family:Arial'>---------------------------------- -------------=
-------------------------------------------------------- >



style=3D'font-size:
10.0pt;font-family:Arial'><Versions
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"> >



style=3D'font-size:
10.0pt;font-family:Arial'> 



style=3D'font-size:
10.0pt;font-family:Arial'>  =
<Version_Id>962</Version_Id>



style=3D'font-size:
10.0pt;font-family:Arial'>  =
<Version>0.0.0.0</Version>



style=3D'font-size:
10.0pt;font-family:Arial'>  =
<Process_Id>600</Process_Id>



style=3D'font-size:
10.0pt;font-family:Arial'> 
<CreatedDateTime>2007-11-13T11:19:28.20</CreatedDateTime> >



style=3D'font-size:
10.0pt;font-family:Arial'></Versions>



style=3D'font-size:
10.0pt;font-family:Arial'> 



style=3D'font-size:
10.0pt;font-family:Arial'><Versions =
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"> >



style=3D'font-size:
10.0pt;font-family:Arial'> 



style=3D'font-size:
10.0pt;font-family:Arial'>  =
<Version_Id>963</Version_Id>



style=3D'font-size:
10.0pt;font-family:Arial'>  =
<Version>0.0.0.1</Version>



style=3D'font-size:
10.0pt;font-family:Arial'>  =
<Process_Id>600</Process_Id>



style=3D'font-size:
10.0pt;font-family:Arial'> 
<CreatedDateTime>2007-11-13T11:19:38.50</CreatedDateTime> >



style=3D'font-size:
10.0pt;font-family:Arial'></Versions>



style=3D'font-size:
10.0pt;font-family:Arial'> 



style=3D'font-size:
10.0pt;font-family:Arial'><Versions
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"> >



style=3D'font-size:
10.0pt;font-family:Arial'> 



style=3D'font-size:
10.0pt;font-family:Arial'>  =
<Version_Id>964</Version_Id>



style=3D'font-size:
10.0pt;font-family:Arial'>  =
<Version>0.0.0.2</Version>



style=3D'font-size:
10.0pt;font-family:Arial'>  =
<Process_Id>600</Process_Id>



style=3D'font-size:
10.0pt;font-family:Arial'> 
<CreatedDateTime>2007-11-13T11:19:38.50</CreatedDateTime> >



style=3D'font-size:
10.0pt;font-family:Arial'></Versions>



style=3D'font-size:
10.0pt;font-family:Arial'> 



style=3D'font-size:
10.0pt;font-family:Arial'><Versions =
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"> >



style=3D'font-size:
10.0pt;font-family:Arial'> 



style=3D'font-size:
10.0pt;font-family:Arial'>  =
<Version_Id>965</Version_Id>



style=3D'font-size:
10.0pt;font-family:Arial'>  =
<Version>0.0.0.3</Version>



style=3D'font-size:
10.0pt;font-family:Arial'>  =
<Process_Id>600</Process_Id>



style=3D'font-size:
10.0pt;font-family:Arial'> 
<CreatedDateTime>2007-11-13T11:19:38.50</CreatedDateTime> >



style=3D'font-size:
10.0pt;font-family:Arial'></Versions>



style=3D'font-size:
10.0pt;font-family:Arial'>---------------------------------- -------------=
-------------------------------------------------------- >



style=3D'font-size:
10.0pt;font-family:Arial'> 



style=3D'font-size:
10.0pt;font-family:Arial'>Can anyone help =
me?



style=3D'font-size:
10.0pt;font-family:Arial'> 



style=3D'font-size:
10.0pt;font-family:Arial'>Thanks in =
advance,



style=3D'font-size:
10.0pt;font-family:Arial'> 



style=3D'font-size:
10.0pt;font-family:Arial'>Luigi



style=3D'font-size:
10.0pt;font-family:Arial'> 



style=3D'font-size:
10.0pt;font-family:Arial'> 



style=3D'font-size:
10.0pt;font-family:Arial'> 



lang=3DEN-GB
style=3D'font-size:12.0pt'> 



lang=3DEN-GB
style=3D'font-size:12.0pt'> 









------=_NextPart_000_0000_01C83115.D287F9A0--

Re: table_to_xml command isn"t working

am 28.11.2007 04:28:59 von Hiroshi Inoue

Luigi Pirillo wrote:
> Hello,
>
>
>
> I have registered an odbc entry (named xfpdb) on my Windows XP Pro
> machine using PosgreSQL Ansi vers. 8.02.05 (my db server is 8.3 beta 1).
>
> Using a simple VB 6.0 code, I have tried to connect to it and return
> some XML information using ADO as in the following:

Could you send me directly the Mylog output ?

regards,
Hiroshi Inoue


---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org