SMS queries from Front Page
SMS queries from Front Page
(OP)
Hi,
Can someone point me to a good resource for querying SMS data from MS Front Page?
I have created a query in SMS with this syntax:
select IPAddresses, Name, OperatingSystemNameandVersion, SystemRoles from SMS_R_System where IPAddresses >= "24.1.21.32" and IPAddresses <= "24.1.21.63" order by IPAddresses
and I get the desired results in SMS.
I created an ODBC connection to the SMS server from my IIS server. When I verify this same query in Front Page, I get the following result:
Server error: Unable to retrieve schema information from the query:
(connection info, yadda yadda , no errors)
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'SMS_R_System'.
Source: Microsoft OLE DB Provider for ODBC Drivers
Number: -2147467259 (0x80004005)
Thanks for any help,
Chris
Can someone point me to a good resource for querying SMS data from MS Front Page?
I have created a query in SMS with this syntax:
select IPAddresses, Name, OperatingSystemNameandVersion, SystemRoles from SMS_R_System where IPAddresses >= "24.1.21.32" and IPAddresses <= "24.1.21.63" order by IPAddresses
and I get the desired results in SMS.
I created an ODBC connection to the SMS server from my IIS server. When I verify this same query in Front Page, I get the following result:
Server error: Unable to retrieve schema information from the query:
(connection info, yadda yadda , no errors)
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'SMS_R_System'.
Source: Microsoft OLE DB Provider for ODBC Drivers
Number: -2147467259 (0x80004005)
Thanks for any help,
Chris
RE: SMS queries from Front Page
RE: SMS queries from Front Page
Harry
RE: SMS queries from Front Page
RE: SMS queries from Front Page
It will not work because the query language you cut and pasted from the SMS Admin Console is written in WQL, which wants to access tables through WMI, not SQL. (if you are unaware: WMI is an abstraction layer to the SQL tables themselves)
This means that if you query using the SQL ODBC driver (as your error message describes), but use a query from he SMS Admin Console (WQL), then you will get the error you describe.
The only was to get this query to work is to either use the WMI ODBC driver instead, or to create a SQL view for he data you are querying for, then use the SQL ODBC driver on your web site (this second option is a lot of work, but if you use Microsoft Web Reports, you'll save a lot of effort).