Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Datetime value in table created with openxml() become nu
Message
De
01/06/2005 00:48:09
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01018479
Message ID:
01018878
Vues:
16
>Hi,all,
> When i use openxml() sparsing the XML string which is generated with cursortoxml() in VFP9 into a table , all numeric &
>datetime type of value become null. The original cursor is derived from
>an EXCEL file,ensure that all mentioned data are not null. Can you help me to find the cause? Tks in adv.

>Can you post OPENXML() statement and complete XML with a few records? To >preserve XML in your post, you can enclose it in < pre> and < /pre> tags (w/o) spaces.

Hi Sergey,
Paste details here,tks in adv.
XML:
  <?xml version = "1.0" encoding="Windows-1252" standalone="yes"?>
<VFPData>
	<tmp1>
		<pointcode>HKHKG</pointcode>
		<visitno>2.0</visitno>
		<eta>2004-05-23T00:00:00</eta>
		<etd>2004-05-23T00:00:00</etd>
	</tmp1>
        <tmp1>
		<pointcode>THLCH</pointcode>
		<visitno>1.0</visitno>
		<eta>2004-05-16T00:00:00</eta>
		<etd>2004-05-17T00:00:00</etd>
	</tmp1>
	<tmp1>
		<pointcode>SGSIN</pointcode>
		<visitno>2.0</visitno>
		<eta>2004-05-19T00:00:00</eta>
		<etd>2004-05-19T00:00:00</etd>
	</tmp1>
</VFPData>
SQL SP:
  CREATE PROCEDURE  ReadXML 
(
@xml text
)
as
declare @xdoc int
exec sp_xml_preparedocument @xdoc output, @xml 
--select @xml
select t.*   from openxml (@xdoc, '/VFPData/tmp1',2 )  with (pointcode char(5),visitno numeric(5,1),ETA datetime,ETD datetime) as t
exec sp_xml_removedocument @xdoc
GO
Steven
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform