Hi,
You kindly helped me with the Soccer Site. I tried to contact you at your homepage but the e/mail is not working. I would be truly grateful to you if you could take a look at this.
Before you start it is probably best to go to
www.sitepoint.com. Then, click XML,XSLT & Web Services. Then go to the bottom of the page and select "Retrieving data as XML from SQL Server" This is the article I am working on.
I have basically followed his code, and database config but
when I load prodtest asp in to the browser to display through IIS/localhost the parser gives following error message:
"
Error Type:
ADODB.Command (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/prodtest/prodtest.asp, line 16
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Page:
GET /prodtest/prodtest.asp
Time:
Tuesday, June 15, 2004, 9:02:20 PM
More information:
Microsoft Support "
Line 16 relates to this line of code :"objComm.CommandType = adCmdStoredProc" out of the prodtest.asp page which is below to make things a :
"
<!-- metadata type=3D"typelib"
file=3D"f:\program files\common files\system\ado\msado15.dll"> -->
<%
dim objStream
dim objConn
dim objComm
dim objXML
set objStream = Server.CreateObject("ADODB.Stream")
set objConn = Server.CreateObject("ADODB.Connection")
set objComm = Server.CreateObject("ADODB.Command")
set objXML = Server.CreateObject("MSXML2.DOMDocument")
objConn.Open "Provider=SQLOLEDB; Data Source=(local); Initial Catalog=myProducts; UId=admin; Pwd="
objComm.ActiveConnection = objConn
objComm.CommandType = adCmdStoredProc
objComm.CommandText = "sp_GetExplicitXML"
objStream.Open
objComm.Properties("Output Stream").Value = objStream
objComm.Execute ,, adExecuteStream
objStream.Position = 0
objXML.LoadXML("<?xml version='1.0'?><?xml-stylesheet type='text/xsl' href='prodtest.xsl'?><My_Products>" &_
objStream.ReadText & "</My_Products>")
if objXML.parseError.errorCode <> 0 then
Response.Write "Error loading XML: " & objXML.parseError.reason
Response.End
end if
Response.ContentType = "text/xml"
Response.Write objXML.xml
%> "
I created and named the stored procedure which executed without mishap, the database is also populated with the use of of your code. So I am baffled by this. Is the problem with the code, the database and stored procedure or something else?
I have noticed that the code marked green "<?xml version='1.0'?><?xml-stylesheet type='text/xsl' href='prodtest.xsl'?>" does not completely tally with the namespace in prodtest.xsl "<?xml version="1.0"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">". Could this be causing it?
I would be really grateful to you for your help on this:
Bye now,
Eddie Bickford
eddie