question

LucaTramontana-8177 avatar image
0 Votes"
LucaTramontana-8177 asked

Invalid query

Dear all,

I'm getting the below on error on this code:

 Sub GetPidVersionTwo()
     Dim objSWbemServices As Object
     Dim colSWbemObjectSet As Object
     Dim objSWbemObject As Object
     Dim StrComputer As String
     Dim RstProcess As ADODB.Recordset
     Dim CommandLineToSearch As String
     Dim StrExecQuery As String
     StrComputer = "."
     StrExecQuery = "SELECT ProcessID, Name, CommandLine FROM Win32_Process WHERE Name = 'MSACCESS.EXE' and CommandLine Like '%D:\Database\Sample.accdb%'"

195078-invalidquery.png


I'm sure the issue is on the path D:\Database\Sample.accdb; any way to fix it?

Thanks

power-query-not-supported
invalidquery.png (3.5 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers