Hi joefawcett,
the problem is not solved.
the database contains the word "cancel-nd 50lue netwk cable f".because of the special character in the field "",even though the XML file is generated,it's unable to open in Excel saying "Invalid character found in text content". i modified the code
to
Const adExecuteStream=1024
Const adReadAll=-1
Const adSaveCreateOverWrite = 2
Set FSO=CreateObject("Scripting.filesystemObject")
Set oTestStream =CreateObject("ADODB.Stream")
Set oTestConnection =CreateObject("ADODB.Connection")
Set oTestCommand =CreateObject("ADODB.Command")
oTestConnection.Open "provider=SQLXMLOLEDB.4.0;data provider=SQLNCLI;data source=Ganga;initial catalog=JDE_Development;Integrated Security=SSPI ;"
set oTestCommand.ActiveConnection = oTestConnection
oTestCommand.Properties("ClientSideXML") = True
oTestCommand.CommandText = "SELECT Top 12170 * from proddta.F4801 for XML Auto"
oTestStream.Open
oTestCommand.Properties("Output Stream").Value = oTestStream
oTestCommand.Properties("xml root") = "root"
oTestCommand.Properties("Output Encoding").Value = "iso-8859-1"
oTestCommand.Execute , , adExecuteStream
oTestStream.Position = 0
wscript.echo "write start : " & Now()
oTestStream.Savetofile "C:\log.xml" ,adSaveCreateOverWrite
wscript.echo "write End : " & Now()
I feel there is something i need to add up to the code.
when i searched on net, i found the page
http://forums.microsoft.com/TechNet/...6671&SiteID=17 discussing about this. but i am not sure what to do.
please help me.please modify the code
Thank you
Raj Deep.A