Wrox Programmer Forums
|
BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4
This is the forum to discuss the Wrox book Beginning Dreamweaver MX by Charles E. Brown, Imar Spaanjaars, Todd Marks; ISBN: 9780764544040
Please indicate which version of the book you are using when posting questions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 19th, 2004, 01:23 AM
Registered User
 
Join Date: Jun 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default XML/HTML

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
 
Old June 19th, 2004, 03:48 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Eddie,

I think this message is directed at me, as I saw a couple of error messages in my e-mail explaining that someone was trying to submit malicious code to me through my contact page ;) Just kidding. The contact page is protected with Request Validation (a new .NET 1.1 feature), to protected systems from code injection. I haven't taken the time to rewrite the page so it accepts code submission, but this weekend may be a good time to do so.....

Anyway, back to your problem. The error you get, 0x800A0BB9, often indicates spelling mistakes in table, column or procedure names, or undeclared constants. Are you sure your ADO DLL is located here: F:\program files\common files\system\ado\?

What happens when you add:

Response.Write("adCmdStoredProc has a value of " & adCmdStoredProc )

to your code? It should say 4...

Let me know (through this forum) if that helped or not....

Imar
 
Old June 19th, 2004, 12:02 PM
Registered User
 
Join Date: Jun 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

I tried to insert the code you suggested but the same error comes up.

Regarding msado15.dll, I did have a problem with it to begin with.
Certainly, there is a file by that name in the ado directory on the
f: disk. To begin with the parser said that it could not find the file. I scanned the internet and noticed that others had had the metadata type=3D"typelib" file=3D"f:\program files\common files\system\ado\msado15.dll"> -->same trouble and had used a different include statement using 3D which sent the problem away. So I thought it was cured.

There are a number of .dll files in the ado directory, maybe the one that I have referenced is not the correct one, or I have not registered it. Does it have to be registered?

The response.write does not want to work as part of the code to open the connection to the database at the moment and is giving the same error as before!

So am rather puzzled to say the least. Could you help again?

Bye now,

Eddie Bickford


eddie
 
Old June 19th, 2004, 12:33 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Eddie,

First of all, try this instead:

Response.Write("adCmdStoredProc has a value of " & adCmdStoredProc)
Response.End()

This way, the Write statement will be followed by the End statement, so execution of the page is stopped. Make sure you add these two statements near the beginning of the page, after the metadata stuff, but before the code that executes the SQL.

Secondly, the =3D is a mistake. =3D is actually the escaped value of =. So you should get rid of the 3D.
Alternatively, copy the file adovbs.inc to the root of your site, and then use the following include statement to include that file (dump the metadata stuff if you do so)



You'll find the adovbs file in the same folder as the ADO dll.
Look here for more info:

http://www.adopenstatic.com/faq/800a0bb9step2.asp

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Ambient Nights CD2 by Hephaestion (Track 1 from the album: Mixed by Hephaestion) What's This?
 
Old June 19th, 2004, 12:52 PM
Registered User
 
Join Date: Jun 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Cheers Imar, I checked everything and had a look at the MMC virtual directory to see if everything was correct. As result of some changes, including yours, it now writes the page to the browser. I am delighted.

Thanks$$$

Bye now,

Eddie Bickford;)

eddie





Similar Threads
Thread Thread Starter Forum Replies Last Post
xml to html with xsl boblavinsky XSLT 4 January 5th, 2007 05:30 AM
Is XML supports transformation of HTML to XML? zeeonline XSLT 1 July 28th, 2006 05:13 PM
Html to XML stevoie XSLT 2 February 6th, 2006 12:37 PM
About HTML and XML sachinkumar XML 1 June 28th, 2005 10:30 AM
XML to HTML shoei78 XSLT 2 June 24th, 2003 08:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.