473,385 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

ODBC: WBEM driver

Hello,
I would like to access W2K Eventlog from PHP via ODBC - access to the
system is enabled by "WBEM Driver" (supplied on the W2K CD). My code
looks like this:

$connection = odbc_connect("WBEM Source", "", "")
or die(odbc_errormsg());

$select = "SELECT * FROM Win32_NTLogEvent WHERE Logfile =
'Application'";

$query_result = odbc_do($connection, $select)
or die(odbc_errormsg());

odbc_fetch_row($query_result);
echo odbc_result ($query_result, 1);
odbc_close($connection);

Error produced: "Warning: odbc_do(): SQL error: [Microsoft][WBEM ODBC
Driver][ISAM]Failed to obtain provider interface, SQL state S0000 in
SQLExecDirect".

I suspect I need to pass WMI namespace 'root\cimv2' to the
odbc_connect() function (like with
C:\WINNT\system32\wbem\wbemtest.exe) - but HOW? I've found only
examples for ASP or VB on the Internet. Thanks in advance.

Links:

Querying with WQL
http://msdn.microsoft.com/library/de...g_with_wql.asp

Mapping WMI to ODBC
http://msdn.microsoft.com/library/de...mi_to_odbc.asp
Jul 17 '05 #1
0 1853

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: avihay | last post by:
Hello, Using .NET 1.1 and MS visual studio 2003 we are failing to close an ODBC Connection to an ODBC driver using system.data.odbc. We are getting the following Error from the Microsoft odbc...
4
by: Kong Li | last post by:
Environments: 1. WinXP SP1, MDAC 2.7 SP1 (Microsoft ODBC for Oracle is 2.573.9030.0), Oracle client 9.2.0.1. 2. Win2000 SP4, MDAC 2.7 SP1 (Microsoft ODBC for Oracle is 2.573.9030.0), Oracle...
1
by: Tolik Gusin | last post by:
Hello All, Whether supports DB2 UDB 8.2 FP7 for Linux the ODBC-driver ? If yes, whether that enters this driver into delivery DB2 UDB 8.2 FP7 for Linux ? If it is possible, bring please an...
1
by: Salad | last post by:
Hi: I am developing an application using FoxPro 2.x tables. My client has AccessXP. AccessXP uses Visual Foxpro ODBC to connect to tables. It does not accept the ISAM Foxpro driver used in A97....
2
by: Crazy Cat | last post by:
Hi all, I am having trouble getting linked Oracle 9 server in MS SQL Server 2005 Express to work properly. My machine is running Windows XP. The Microsoft and Oracle OLE DB Providers have...
1
by: tommydkat | last post by:
Hi! We've switched from Developer Studio 6.0 to Visual Studio .net 2003. Our application compiles fine with Visual Studio .net 2003 but when it runs, it uses the Microsoft ODBC driver as is shown...
0
by: bazzer | last post by:
hey, i am using visual basic.net 2003 and have an ASP.NET webform application thats accessing a microsoft access 2003 database. i kept getting the following error when i tried to run it: ERROR ...
0
by: bazzer | last post by:
hey, im trying to access a microsoft access database from an ASP.NET web application in visual basic 2003.NET. i get the following error when i try running it: Server Error in...
2
by: bcbrock | last post by:
I am trying to figure out how to query some data out of a dbase IV (.dbf) file sitting on a remote server from my MySQL/PHP/Web Server. Both servers are Windows Server 2003 SP2. My...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.