sql xml newby

sql xml newby

Post by Jay Grave » Tue, 29 Apr 2003 17:23:53



howdy folks.

just set up iis on my xp pro workstation (let's call
it 'ws1') that hosts a local test site. i also just
configured xml support in iis on ws1. the default.htm
page displays properly on the iis machine and on another
machine (say 'ws2') on the same subnet. however, the
following URL query results will display correctly on s,
under any user accout, but will not display on ws1, even
when logged in as a domain admin account:

http://<iisserver>/<virtualdirectory>/?sql=select first
name from northwind for xml auto&root=myxml

sql server runs on a server (not ws1 or ws2) on the same
subnet.

i've read that 'IE uses an XML parser known as MSXML to
display XML documents.' (ms sql server 2000 unleashed, pg
1320) - does MSXML need to be installed or configured on
every instance of IE that wants to display XML; was
something added to IE on ws1 when i configured XML
support in IIS?

i would love any help on this one... thanks!

 
 
 

sql xml newby

Post by Mike Shar » Wed, 30 Apr 2003 02:11:51


As long as you have IE 5 or higher on the machine you are viewing from (not
necessarily the host machine), you should be able to view the XML.  The only
thing I can see about your installation is the fact that you're doing a URL
query, which is disabled by default (for security reasons).  So if this
works:

http://ws2/<virtualdirectory>/?sql=select first name from northwind for xml
auto&root=myxml

but this one doesn't:

http://ws1/<virtualdirectory>/?sql=select first name from northwind for xml
auto&root=myxml

then check to be sure you've checked the  "allow SQL= ... or Template=...
URL queries".  Once you're satisfied both are working DISABLE the URL
queries, because you don't want some jokester to "Drop Database" on the
URL....

If they're both checked, then something else went wrong when you configured
the non-working one.  I'd delete the Virtual directory, and start over.  My
students sometimes get into this situation, and nothing I do seems to fix
it.  So I start over, and suddenly, everything's fine....

Regards,
Mike Sharp


Quote:> howdy folks.

> just set up iis on my xp pro workstation (let's call
> it 'ws1') that hosts a local test site. i also just
> configured xml support in iis on ws1. the default.htm
> page displays properly on the iis machine and on another
> machine (say 'ws2') on the same subnet. however, the
> following URL query results will display correctly on s,
> under any user accout, but will not display on ws1, even
> when logged in as a domain admin account:

> http://<iisserver>/<virtualdirectory>/?sql=select first
> name from northwind for xml auto&root=myxml

> sql server runs on a server (not ws1 or ws2) on the same
> subnet.

> i've read that 'IE uses an XML parser known as MSXML to
> display XML documents.' (ms sql server 2000 unleashed, pg
> 1320) - does MSXML need to be installed or configured on
> every instance of IE that wants to display XML; was
> something added to IE on ws1 when i configured XML
> support in IIS?

> i would love any help on this one... thanks!


 
 
 

sql xml newby

Post by Jay Grave » Wed, 30 Apr 2003 07:31:37


thanks Mike... that suggestion worked - exactly once! when the message
"page cannot be displayed" came up, i deleted and re-created the virtual
directory over and over again and it hasn't worked since for any user
account on any workstation that isn't the workstation that has iis
installed on it (http://<localhost>/default.htm displays correctly
everywhere on our subnet, however).

i'm following the directions in "ms sql server 2000 unleashed", pg1316,
and it still only works if i'm logged in at the workstation where i
installed iis and xml support (sql server is on another server on the
same subnet).

would the results be different if we installed iis/xml on the server on
which sql server is installed?

i wanted to try it out on my workstation as we dont have a test/dev
server.

why would mighty mighty sun try to foil my first and feeble attempts at
using microsoft's xml/iis? ...i have no other explanation for why it's
not working!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

 
 
 

sql xml newby

Post by Mike Shar » Wed, 30 Apr 2003 08:16:22


It will only work on a box with IIS, and must have ISAPI enabled.  The local
box, with IIS, must be able to query SQL Server.

So your dev machine (or any machine that wants to do it) needs it's own copy
of IIS, with ISAPI enabled, and SQLXML. This rules out, by the way, WinXP
Home edition, though there is a hack to get it to work.  You can relocated
the sqlxml dll on the IIS box, if you need to, as long as IIS can get to it.

Yes, it can be on the SQL Box, but doesn't need to be, and in a perfect
world, probably shouldn't be...

Regards,
Mike Sharp


Quote:> thanks Mike... that suggestion worked - exactly once! when the message
> "page cannot be displayed" came up, i deleted and re-created the virtual
> directory over and over again and it hasn't worked since for any user
> account on any workstation that isn't the workstation that has iis
> installed on it (http://<localhost>/default.htm displays correctly
> everywhere on our subnet, however).

> i'm following the directions in "ms sql server 2000 unleashed", pg1316,
> and it still only works if i'm logged in at the workstation where i
> installed iis and xml support (sql server is on another server on the
> same subnet).

> would the results be different if we installed iis/xml on the server on
> which sql server is installed?

> i wanted to try it out on my workstation as we dont have a test/dev
> server.

> why would mighty mighty sun try to foil my first and feeble attempts at
> using microsoft's xml/iis? ...i have no other explanation for why it's
> not working!

> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

 
 
 

sql xml newby

Post by Jay Grave » Wed, 30 Apr 2003 10:32:24


thanks Mike!

cheers ;)

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

 
 
 

1. SQL XML Stored Procedure using XML Explicit Returing XML to ASP Page

I have a SP that uses XML Explicit,  For example say this SP returns
the following XML

<person first="john" last="doe">
   <City>Some City</City>
   <Age>222</Age>
</person>

If i run the Sp from Query Analyzer it returns this data fine, but i
am having trouble executing the SP from an ASP page and getting the
same data back.

I need to be able to take this XML and Transform it using an XSL
stylesheet.

How can this be done from ASP.

Thanks for any help.

2. TrimTrailingBlanks??

3. SQL newby - ladder against wrong wall ?

4. Access with VB4 16bit.

5. Newby: SQL error handling

6. Performance in Select with Sql Server

7. Newby: SQL Query Help Please

8. *** Help ! Urgent! Pdox 5/W95/Incorrect Option ***

9. Newby @ SQL - Update & Select

10. Newby SQL Question

11. Broken XML when running queries with FOR XML AUTO and FOR XML EXPLICIT

12. Sql 2000 for Xml vs Ado Xml persistance

13. ANN: XQX -- XML SQL to XML