Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 44B862E2E5D for ; Tue, 27 Nov 2007 11:48:25 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 99799-04 for ; Tue, 27 Nov 2007 11:48:08 -0400 (AST) Received: from mailout01.albacom.net (mailout01.albacom.net [217.220.34.13]) by postgresql.org (Postfix) with ESMTP id 1D3562E0033 for ; Tue, 27 Nov 2007 11:48:13 -0400 (AST) Received: (qmail 1165 invoked from network); 27 Nov 2007 15:48:11 -0000 Received: from unknown (HELO PC103) (luigi.pirillo@sky-team.it@217.221.237.206) by mailout01.albacom.net with ESMTPA; 27 Nov 2007 15:48:09 -0000 From: "Luigi Pirillo" To: Subject: table_to_xml command isn't working Date: Tue, 27 Nov 2007 16:51:54 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0000_01C83115.D287F9A0" X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcgxDW6fXTJwOWRiSsGZ6pk20ebBow== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 Message-Id: <20071127154814.1D3562E0033@postgresql.org> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.212 tagged_above=0 required=5 tests=BAYES_40=-0.185, HTML_MESSAGE=0.001, WEIRD_QUOTING=1.396 X-Spam-Level: * X-Archive-Number: 200711/43 X-Sequence-Number: 9258 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 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

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=3DMSDASQL.1;Persist Security Info=3DFalse;Data Source=3Dxfpdb"

    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:

-----------------------------------------------= --------------------------------------------------------

<Versions xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance">

 

  = <Version_Id>962</Version_Id>

  = <Version>0.0.0.0</Version>

  = <Process_Id>600</Process_Id>

  <CreatedDateTime>2007-11-13T11:19:28.20</CreatedDateTime>

</Versions>

 

<Versions xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance">

 

  = <Version_Id>963</Version_Id>

  = <Version>0.0.0.1</Version>

  = <Process_Id>600</Process_Id>

  <CreatedDateTime>2007-11-13T11:19:38.50</CreatedDateTime>

</Versions>

 

<Versions = xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance">

 

  = <Version_Id>964</Version_Id>

  = <Version>0.0.0.2</Version>

  = <Process_Id>600</Process_Id>

  <CreatedDateTime>2007-11-13T11:19:38.50</CreatedDateTime>

</Versions>

 

<Versions xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance">

 

  = <Version_Id>965</Version_Id>

  = <Version>0.0.0.3</Version>

  = <Process_Id>600</Process_Id>

  <CreatedDateTime>2007-11-13T11:19:38.50</C   &nbs= p;            = ;    @ 

-----------------------------------------------= --------------------------------------------------------

 

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:

 

-----------------------------------------------= --------------------------------------------------------

<Versions xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance">

 

  = <Version_Id>962</Version_Id>

  = <Version>0.0.0.0</Version>

  = <Process_Id>600</Process_Id>

  <CreatedDateTime>2007-11-13T11:19:28.20</CreatedDateTime>

</Versions>

 

<Versions = xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance">

 

  = <Version_Id>963</Version_Id>

  = <Version>0.0.0.1</Version>

  = <Process_Id>600</Process_Id>

  <CreatedDateTime>2007-11-13T11:19:38.50</CreatedDateTime>

</Versions>

 

<Versions xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance">

 

  = <Version_Id>964</Version_Id>

  = <Version>0.0.0.2</Version>

  = <Process_Id>600</Process_Id>

  <CreatedDateTime>2007-11-13T11:19:38.50</CreatedDateTime>

</Versions>

 

<Versions = xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance">

 

  = <Version_Id>965</Version_Id>

  = <Version>0.0.0.3</Version>

  = <Process_Id>600</Process_Id>

  <CreatedDateTime>2007-11-13T11:19:38.50</CreatedDateTime>

</Versions>

-----------------------------------------------= --------------------------------------------------------

 

Can anyone help = me?

 

Thanks in = advance,

 

Luigi

 

 

 

 

 

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