Event Log Queries

Ok, so I'm working on querying multiple DC's to look for a specific
event ID (645 in the security logs, for computers recently joined to
the domain).  I thought I had everything figured out, but it's still
not working right.  Running the script, it just somewhat hangs...not
sure if that's just because it's still searching or not and is slow.

Let me know if you guys have any thoughts...thanks!

Dim objDictionary

Set objDictionary = CreateObject("Scripting.Dictionary")

arrComputers = Array("DC02", "DC03")
iReach = 0

For Each strComputer in arrComputers
   Connect strComputer
Next

If (iReach = 0) Then
   WScript.Echo "No Computers were reachable!"
   WScript.Quit
End If

colKeys = objDictionary.Keys

If (colKeys.Count = 0) Then
   WScript.Echo "No events were found!"
   WScript.Quit
End If

For Each strKey in colKeys
   WScript.Echo strKey
Next

WScript.Quit

Sub Connect(sComputer)
   On Error Resume Next
   Set objWMIService = GetObject("winmgmts:" _
       & "{impersonationLevel=impersonate}!\\" & sComputer & "\root
\cimv2")
   If (Err.Number <> 0) Then
      On Error GoTo 0
      WScript.echo "Could not connect to " & sComputer
      Exit Sub
   End If
   On Error GoTo 0

   iReach = iReach + 1

   Set colLoggedEvents = objWMIService.ExecQuery _
      ("Select * From Win32_NTLogEvent Where Logfile = 'Security' AND
(EventCode = 645)")
         ' 645 = Computer joined to domain

   For Each objEvent in colLoggedEvents
       strEventCode = objEvent.EventCode
       srtMessage = Trim( Replace( objEvent.Message, vbCrLf, " "))
          objDictionary.Add strEventCode, strMessage
   Next
End Sub
0
ekrengel
6/9/2010 4:31:58 PM
scripting.vbscript 564 articles. 0 followers. Follow

6 Replies
1097 Views

Similar Articles

[PageSpeed] 34

On Jun 9, 12:31=A0pm, ekrengel <erickreng...@gmail.com> wrote:
> Ok, so I'm working on querying multiple DC's to look for a specific
> event ID (645 in the security logs, for computers recently joined to
> the domain). =A0I thought I had everything figured out, but it's still
> not working right. =A0Running the script, it just somewhat hangs...not
> sure if that's just because it's still searching or not and is slow.
>
> Let me know if you guys have any thoughts...thanks!
>
> Dim objDictionary
>
> Set objDictionary =3D CreateObject("Scripting.Dictionary")
>
> arrComputers =3D Array("DC02", "DC03")
> iReach =3D 0
>
> For Each strComputer in arrComputers
> =A0 =A0Connect strComputer
> Next
>
> If (iReach =3D 0) Then
> =A0 =A0WScript.Echo "No Computers were reachable!"
> =A0 =A0WScript.Quit
> End If
>
> colKeys =3D objDictionary.Keys
>
> If (colKeys.Count =3D 0) Then
> =A0 =A0WScript.Echo "No events were found!"
> =A0 =A0WScript.Quit
> End If
>
> For Each strKey in colKeys
> =A0 =A0WScript.Echo strKey
> Next
>
> WScript.Quit
>
> Sub Connect(sComputer)
> =A0 =A0On Error Resume Next
> =A0 =A0Set objWMIService =3D GetObject("winmgmts:" _
> =A0 =A0 =A0 =A0& "{impersonationLevel=3Dimpersonate}!\\" & sComputer & "\=
root
> \cimv2")
> =A0 =A0If (Err.Number <> 0) Then
> =A0 =A0 =A0 On Error GoTo 0
> =A0 =A0 =A0 WScript.echo "Could not connect to " & sComputer
> =A0 =A0 =A0 Exit Sub
> =A0 =A0End If
> =A0 =A0On Error GoTo 0
>
> =A0 =A0iReach =3D iReach + 1
>
> =A0 =A0Set colLoggedEvents =3D objWMIService.ExecQuery _
> =A0 =A0 =A0 ("Select * From Win32_NTLogEvent Where Logfile =3D 'Security'=
 AND
> (EventCode =3D 645)")
> =A0 =A0 =A0 =A0 =A0' 645 =3D Computer joined to domain
>
> =A0 =A0For Each objEvent in colLoggedEvents
> =A0 =A0 =A0 =A0strEventCode =3D objEvent.EventCode
> =A0 =A0 =A0 =A0srtMessage =3D Trim( Replace( objEvent.Message, vbCrLf, " =
"))
> =A0 =A0 =A0 =A0 =A0 objDictionary.Add strEventCode, strMessage
> =A0 =A0Next
> End Sub

The issue is definitely with the "for" statement in the sub.  I went
through some debugging and found the script hangs there.  It doesn't
make it past the first "For Each" line.  I still don't know what's
wrong with this statement though, or what's causing it to hang.

   For Each objEvent in colLoggedEvents

   wscript.echo "got past for statement"
   wscript.quit

       strEventCode =3D objEvent.EventCode
       srtMessage =3D Trim( Replace( objEvent.Message, vbCrLf, " "))
          objDictionary.Add strEventCode, strMessage
   Next
0
ekrengel
6/14/2010 2:52:45 PM
On Jun 14, 10:52=A0am, ekrengel <erickreng...@gmail.com> wrote:
> On Jun 9, 12:31=A0pm, ekrengel <erickreng...@gmail.com> wrote:
>
>
>
> > Ok, so I'm working on querying multiple DC's to look for a specific
> > event ID (645 in the security logs, for computers recently joined to
> > the domain). =A0I thought I had everything figured out, but it's still
> > not working right. =A0Running the script, it just somewhat hangs...not
> > sure if that's just because it's still searching or not and is slow.
>
> > Let me know if you guys have any thoughts...thanks!
>
> > Dim objDictionary
>
> > Set objDictionary =3D CreateObject("Scripting.Dictionary")
>
> > arrComputers =3D Array("DC02", "DC03")
> > iReach =3D 0
>
> > For Each strComputer in arrComputers
> > =A0 =A0Connect strComputer
> > Next
>
> > If (iReach =3D 0) Then
> > =A0 =A0WScript.Echo "No Computers were reachable!"
> > =A0 =A0WScript.Quit
> > End If
>
> > colKeys =3D objDictionary.Keys
>
> > If (colKeys.Count =3D 0) Then
> > =A0 =A0WScript.Echo "No events were found!"
> > =A0 =A0WScript.Quit
> > End If
>
> > For Each strKey in colKeys
> > =A0 =A0WScript.Echo strKey
> > Next
>
> > WScript.Quit
>
> > Sub Connect(sComputer)
> > =A0 =A0On Error Resume Next
> > =A0 =A0Set objWMIService =3D GetObject("winmgmts:" _
> > =A0 =A0 =A0 =A0& "{impersonationLevel=3Dimpersonate}!\\" & sComputer & =
"\root
> > \cimv2")
> > =A0 =A0If (Err.Number <> 0) Then
> > =A0 =A0 =A0 On Error GoTo 0
> > =A0 =A0 =A0 WScript.echo "Could not connect to " & sComputer
> > =A0 =A0 =A0 Exit Sub
> > =A0 =A0End If
> > =A0 =A0On Error GoTo 0
>
> > =A0 =A0iReach =3D iReach + 1
>
> > =A0 =A0Set colLoggedEvents =3D objWMIService.ExecQuery _
> > =A0 =A0 =A0 ("Select * From Win32_NTLogEvent Where Logfile =3D 'Securit=
y' AND
> > (EventCode =3D 645)")
> > =A0 =A0 =A0 =A0 =A0' 645 =3D Computer joined to domain
>
> > =A0 =A0For Each objEvent in colLoggedEvents
> > =A0 =A0 =A0 =A0strEventCode =3D objEvent.EventCode
> > =A0 =A0 =A0 =A0srtMessage =3D Trim( Replace( objEvent.Message, vbCrLf, =
" "))
> > =A0 =A0 =A0 =A0 =A0 objDictionary.Add strEventCode, strMessage
> > =A0 =A0Next
> > End Sub
>
> The issue is definitely with the "for" statement in the sub. =A0I went
> through some debugging and found the script hangs there. =A0It doesn't
> make it past the first "For Each" line. =A0I still don't know what's
> wrong with this statement though, or what's causing it to hang.
>
> =A0 =A0For Each objEvent in colLoggedEvents
>
> =A0 =A0wscript.echo "got past for statement"
> =A0 =A0wscript.quit
>
> =A0 =A0 =A0 =A0strEventCode =3D objEvent.EventCode
> =A0 =A0 =A0 =A0srtMessage =3D Trim( Replace( objEvent.Message, vbCrLf, " =
"))
> =A0 =A0 =A0 =A0 =A0 objDictionary.Add strEventCode, strMessage
> =A0 =A0Next

So I take what I said back =3D)

It's really just a matter of WMI being slow and me being
impatient...it takes a while for it to query the security logs.  I
made some changes to the script where I had errors:

Dim objDictionary

Set objDictionary =3D CreateObject("Scripting.Dictionary")

arrComputers =3D Array("DC02")
iReach =3D 0

For Each strComputer in arrComputers
   Connect strComputer
Next

If (iReach =3D 0) Then
   WScript.Echo "No Computers were reachable!"
   WScript.Quit
End If

strEventCount =3D objDictionary.Count
If (strEventCount =3D 0) Then
   WScript.Echo "No events were found!"
   WScript.Quit
End If

colKeys =3D objDictionary.Keys
For Each strKey in colKeys
   WScript.Echo strKey
Next

WScript.Quit

Sub Connect(sComputer)
   On Error Resume Next
   Set objWMIService =3D GetObject("winmgmts:" _
      & "{impersonationLevel=3Dimpersonate,(Security)}!\\" _
      & sComputer & "\root\cimv2")

   If (Err.Number <> 0) Then
      On Error GoTo 0
      WScript.echo "Could not connect to " & sComputer
      Exit Sub
   End If
   On Error GoTo 0

   iReach =3D iReach + 1

   Set colLoggedEvents =3D objWMIService.ExecQuery _
      ("Select * From Win32_NTLogEvent Where Logfile =3D 'Security' AND
EventCode =3D '645'",,48)

   For Each objEvent in colLoggedEvents
       strEventCode =3D objEvent.EventCode
       srtMessage =3D Trim( Replace( objEvent.Message, vbCrLf, " "))
          objDictionary.Add strEventCode, strMessage
   Next
End Sub
0
ekrengel
6/14/2010 4:06:41 PM
On Jun 14, 11:06=A0am, ekrengel <erickreng...@gmail.com> wrote:
> On Jun 14, 10:52=A0am, ekrengel <erickreng...@gmail.com> wrote:
>
>
>
>
>
> > On Jun 9, 12:31=A0pm, ekrengel <erickreng...@gmail.com> wrote:
>
> > > Ok, so I'm working on querying multiple DC's to look for a specific
> > > event ID (645 in the security logs, for computers recently joined to
> > > the domain). =A0I thought I had everything figured out, but it's stil=
l
> > > not working right. =A0Running the script, it just somewhat hangs...no=
t
> > > sure if that's just because it's still searching or not and is slow.
>
> > > Let me know if you guys have any thoughts...thanks!
>
> > > Dim objDictionary
>
> > > Set objDictionary =3D CreateObject("Scripting.Dictionary")
>
> > > arrComputers =3D Array("DC02", "DC03")
> > > iReach =3D 0
>
> > > For Each strComputer in arrComputers
> > > =A0 =A0Connect strComputer
> > > Next
>
> > > If (iReach =3D 0) Then
> > > =A0 =A0WScript.Echo "No Computers were reachable!"
> > > =A0 =A0WScript.Quit
> > > End If
>
> > > colKeys =3D objDictionary.Keys
>
> > > If (colKeys.Count =3D 0) Then
> > > =A0 =A0WScript.Echo "No events were found!"
> > > =A0 =A0WScript.Quit
> > > End If
>
> > > For Each strKey in colKeys
> > > =A0 =A0WScript.Echo strKey
> > > Next
>
> > > WScript.Quit
>
> > > Sub Connect(sComputer)
> > > =A0 =A0On Error Resume Next
> > > =A0 =A0Set objWMIService =3D GetObject("winmgmts:" _
> > > =A0 =A0 =A0 =A0& "{impersonationLevel=3Dimpersonate}!\\" & sComputer =
& "\root
> > > \cimv2")
> > > =A0 =A0If (Err.Number <> 0) Then
> > > =A0 =A0 =A0 On Error GoTo 0
> > > =A0 =A0 =A0 WScript.echo "Could not connect to " & sComputer
> > > =A0 =A0 =A0 Exit Sub
> > > =A0 =A0End If
> > > =A0 =A0On Error GoTo 0
>
> > > =A0 =A0iReach =3D iReach + 1
>
> > > =A0 =A0Set colLoggedEvents =3D objWMIService.ExecQuery _
> > > =A0 =A0 =A0 ("Select * From Win32_NTLogEvent Where Logfile =3D 'Secur=
ity' AND
> > > (EventCode =3D 645)")
> > > =A0 =A0 =A0 =A0 =A0' 645 =3D Computer joined to domain
>
> > > =A0 =A0For Each objEvent in colLoggedEvents
> > > =A0 =A0 =A0 =A0strEventCode =3D objEvent.EventCode
> > > =A0 =A0 =A0 =A0srtMessage =3D Trim( Replace( objEvent.Message, vbCrLf=
, " "))
> > > =A0 =A0 =A0 =A0 =A0 objDictionary.Add strEventCode, strMessage
> > > =A0 =A0Next
> > > End Sub
>
> > The issue is definitely with the "for" statement in the sub. =A0I went
> > through some debugging and found the script hangs there. =A0It doesn't
> > make it past the first "For Each" line. =A0I still don't know what's
> > wrong with this statement though, or what's causing it to hang.
>
> > =A0 =A0For Each objEvent in colLoggedEvents
>
> > =A0 =A0wscript.echo "got past for statement"
> > =A0 =A0wscript.quit
>
> > =A0 =A0 =A0 =A0strEventCode =3D objEvent.EventCode
> > =A0 =A0 =A0 =A0srtMessage =3D Trim( Replace( objEvent.Message, vbCrLf, =
" "))
> > =A0 =A0 =A0 =A0 =A0 objDictionary.Add strEventCode, strMessage
> > =A0 =A0Next
>
> So I take what I said back =3D)
>
> It's really just a matter of WMI being slow and me being
> impatient...it takes a while for it to query the security logs. =A0I
> made some changes to the script where I had errors:
>
> Dim objDictionary
>
> Set objDictionary =3D CreateObject("Scripting.Dictionary")
>
> arrComputers =3D Array("DC02")
> iReach =3D 0
>
> For Each strComputer in arrComputers
> =A0 =A0Connect strComputer
> Next
>
> If (iReach =3D 0) Then
> =A0 =A0WScript.Echo "No Computers were reachable!"
> =A0 =A0WScript.Quit
> End If
>
> strEventCount =3D objDictionary.Count
> If (strEventCount =3D 0) Then
> =A0 =A0WScript.Echo "No events were found!"
> =A0 =A0WScript.Quit
> End If
>
> colKeys =3D objDictionary.Keys
> For Each strKey in colKeys
> =A0 =A0WScript.Echo strKey
> Next
>
> WScript.Quit
>
> Sub Connect(sComputer)
> =A0 =A0On Error Resume Next
> =A0 =A0Set objWMIService =3D GetObject("winmgmts:" _
> =A0 =A0 =A0 & "{impersonationLevel=3Dimpersonate,(Security)}!\\" _
> =A0 =A0 =A0 & sComputer & "\root\cimv2")
>
> =A0 =A0If (Err.Number <> 0) Then
> =A0 =A0 =A0 On Error GoTo 0
> =A0 =A0 =A0 WScript.echo "Could not connect to " & sComputer
> =A0 =A0 =A0 Exit Sub
> =A0 =A0End If
> =A0 =A0On Error GoTo 0
>
> =A0 =A0iReach =3D iReach + 1
>
> =A0 =A0Set colLoggedEvents =3D objWMIService.ExecQuery _
> =A0 =A0 =A0 ("Select * From Win32_NTLogEvent Where Logfile =3D 'Security'=
 AND
> EventCode =3D '645'",,48)
>
> =A0 =A0For Each objEvent in colLoggedEvents
> =A0 =A0 =A0 =A0strEventCode =3D objEvent.EventCode
> =A0 =A0 =A0 =A0srtMessage =3D Trim( Replace( objEvent.Message, vbCrLf, " =
"))
> =A0 =A0 =A0 =A0 =A0 objDictionary.Add strEventCode, strMessage
> =A0 =A0Next
> End Sub- Hide quoted text -
>
> - Show quoted text -

How about a "On error resume next" at the top?  Couldn't hurt to try
for purposes of diagnosis.

Jim
0
BigDaddyJim
6/15/2010 11:43:46 AM
On Jun 15, 7:43=A0am, BigDaddyJim <hungerfo...@gmail.com> wrote:
>
> How about a "On error resume next" at the top? =A0Couldn't hurt to try
> for purposes of diagnosis.
>
> Jim

I think that's a decidedly LOUSY idea.  It can and does hurt to
blanket a script with On Error Resume Next (though lots of sample
scripts do it).  Because it makes troubleshooting HARDER.  With it in
place, the true source of the problem is generally hidden.  Rather,
the script tries to 'soldier on', with incorrect intermediate results,
often with disastrous results - like corrupting data.  It leaves the
user to wonder what happened, with likely misleading symptoms of the
real problem.

The only time it is justified, IMHO, is when a specific bit of code is
targeted and specific error handling code is added to test the
Err.Number and act accordingly.  In that way, the programmer
anticipates errors and provides logical workarounds to keep the
program on track (or asks the user to make the decision).
_____________________
Tom Lavedas
0
Tom
6/15/2010 12:32:15 PM
On Jun 15, 8:32=A0am, Tom Lavedas <tglba...@verizon.net> wrote:
> On Jun 15, 7:43=A0am, BigDaddyJim <hungerfo...@gmail.com> wrote:
>
>
>
> > How about a "On error resume next" at the top? =A0Couldn't hurt to try
> > for purposes of diagnosis.
>
> > Jim
>
> I think that's a decidedly LOUSY idea. =A0It can and does hurt to
> blanket a script with On Error Resume Next (though lots of sample
> scripts do it). =A0Because it makes troubleshooting HARDER. =A0With it in
> place, the true source of the problem is generally hidden. =A0Rather,
> the script tries to 'soldier on', with incorrect intermediate results,
> often with disastrous results - like corrupting data. =A0It leaves the
> user to wonder what happened, with likely misleading symptoms of the
> real problem.
>
> The only time it is justified, IMHO, is when a specific bit of code is
> targeted and specific error handling code is added to test the
> Err.Number and act accordingly. =A0In that way, the programmer
> anticipates errors and provides logical workarounds to keep the
> program on track (or asks the user to make the decision).
> _____________________
> Tom Lavedas

Yes exactly.  I do use "On Error Resume Next" at some parts of the
script, but that is because of exactly what Tom just explained.  If
you do use it, the error should always be cleared after the error has
been caught (that's if you want to continue with the script and catch
other errors in the same way).

Anyway, there really isn't anything wrong with the script as far as I
can see now...I was just being impatient.  Unless someone can think of
a way to speed it up?  =3D)
0
ekrengel
6/15/2010 3:17:19 PM
On Jun 15, 11:17=A0am, ekrengel <erickreng...@gmail.com> wrote:
> On Jun 15, 8:32=A0am, Tom Lavedas <tglba...@verizon.net> wrote:
>
>
>
> > On Jun 15, 7:43=A0am, BigDaddyJim <hungerfo...@gmail.com> wrote:
>
> > > How about a "On error resume next" at the top? =A0Couldn't hurt to tr=
y
> > > for purposes of diagnosis.
>
> > > Jim
>
> > I think that's a decidedly LOUSY idea. =A0It can and does hurt to
> > blanket a script with On Error Resume Next (though lots of sample
> > scripts do it). =A0Because it makes troubleshooting HARDER. =A0With it =
in
> > place, the true source of the problem is generally hidden. =A0Rather,
> > the script tries to 'soldier on', with incorrect intermediate results,
> > often with disastrous results - like corrupting data. =A0It leaves the
> > user to wonder what happened, with likely misleading symptoms of the
> > real problem.
>
> > The only time it is justified, IMHO, is when a specific bit of code is
> > targeted and specific error handling code is added to test the
> > Err.Number and act accordingly. =A0In that way, the programmer
> > anticipates errors and provides logical workarounds to keep the
> > program on track (or asks the user to make the decision).
> > _____________________
> > Tom Lavedas
>
> Yes exactly. =A0I do use "On Error Resume Next" at some parts of the
> script, but that is because of exactly what Tom just explained. =A0If
> you do use it, the error should always be cleared after the error has
> been caught (that's if you want to continue with the script and catch
> other errors in the same way).
>
> Anyway, there really isn't anything wrong with the script as far as I
> can see now...I was just being impatient. =A0Unless someone can think of
> a way to speed it up? =A0=3D)

Just an update...I found another method using "ExecQueryAsync", and it
was faster...but only by about 10 seconds =3D)  Not enough to make a
difference.
0
ekrengel
6/16/2010 4:30:52 PM
Reply:

Similar Artilces:

Outlook 2003 Duplicate Events
I have noticed, that when I receive a meeting request and accept it - two events are placed into my calendar for the same meeting (One as tentative the other accepted). What is causing this, and how can I stop it from happening? Thanks! Jeff ...

What's the use of LOG file in MDBDATA
To whom it may concern I am now using Exchange 2003 now. I find there are many .LOG files in the folder MDBDATA where 5 G each What's the use of this files ? Can I delete those file ? On Thu, 16 Mar 2006 09:57:35 +0800, "Hughs Man" <hughs@easystem-hk.com> wrote: >To whom it may concern > >I am now using Exchange 2003 now. >I find there are many .LOG files in the folder MDBDATA where 5 G each > >What's the use of this files ? >Can I delete those file ? > Those are your transaction logs. DO NOT delete them. Run a full, online exchange awa...

How to Analyze Attributes in a Query
Is there a function/formula that you can use in a query against a field to return what type of attribute the field value is? If so, can you then change that attribute just in the query output? Thanks. SHKNBKE What do you meand by attribute? Are you talking about the data in the field? -- Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder. "SHKNBKE" wrote: > Is there a function/formula that you can use in a query against a field to > return what type of attribute the field value is? > > If so...

Linking queries on a report
Hello all, I built a number of queries that all tie to the same table. Each query sorts the data differently, but comes from the same data source. I would like to show the results of these queries on the same report, but I get and error message that the wizard can't connect the queries. How can I display multiple queries on the same report. I've tried subreports, but they don't seem to export as well. Thanks b Brennan What does "export" have to do with this? If I have multiple sets of results I want to show in one place, I create an empty "main"...

min query
Hi, How do I get the 2nd minimum value and the 3rd minimum from a table after I have done MIN query for the 1st minimum value? SELECT dbo_CON.SC, dbo_CON.SN, Min(dbo_CON.SQ) AS MinOfSQ FROM dbo_CON GROUP BY dbo_CON.SC, dbo_CON.SN HAVING (((dbo_CON.SC)<>49)); Thanks, Hi Jerry, This will give me three different SC SN records. I am looking for same SC SN records that has next min SQ. table SC SN SQ 1 100 1 1 100 2 1 100 3 1 100 ...

Excel and Access Database Query
Hi I'm starting with a Spreadsheet that is being used to represent the financial and audit information for individual projects. 1 spreadsheet document = 1 project. I have a worksheet that is linked to an Access Database. I need the information from this Spreadsheet Document to be filtered into a Formatted Worksheet within another Spreadsheet Document. Currently I have the Worksheets (linked and formatted) in the same document and I am using a VLOOKUP format to transfer the information. However my problem occurs - because I need to 'save as' so that each individual project...

Deleted Entourage calendar events not deleting in iCal
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Email Client: imap Hi, <br><br>Here's yet another sync oddity regarding Entourage and iCal/Mobileme. When I delete a calendar item in my Entourage calendar, it is not getting deleted in iCal and MobileMe and, hence, my iPhone. Even when I sync the iPhone manually via iTunes, the deleted item remains. Any thoughts on how to correct this would be appreciated. <br><br>Thank you. ...

Need help with query summing hours
Tring to get total worked hours and total maintenance hours summary. I have a table with the clock hours WorkID WorkDate WorkEmployeeID WorkHours And have a maintenace table MaintID MaintDate MaintEmployeeID MaintHours Needing help combining the information to get summary something like this.. Date - Employee - Clock Hours - Maintenance Hours 1/1/10 Joe Billy Bob 8 6 1/1/10 Billy Joe Bob 8 7 Whay type of query do I need to build, any help would be great. Thanks -- Message posted via http://www.accessmo...

Moving Exchange logs and database
I am attempting to move the log and database files for Exchange 2003. I have followed all the steps listed here: http://support.microsoft.com/?kbid=821915 However, the log files are still being written to the old log folder. Are there any subsequent steps that need to be followed? Is it just a matter of waiting? Thank you for your help, Nick Are you sure you're looking at the right logs? Did you make the change for all storage groups? -- Ed Crowley MVP - Exchange "Protecting the world from PSTs and brick backups!" <nicenick@gmail.com> wrote in message news:1158769...

make query from to 64 bit system
I have a application need to be compile for 64 bit system. how can i read data from vb.net 2005. hi Jennifer, On 09.12.2009 17:36, Jennifer wrote: > I have a application need to be compile for 64 bit system. how can i read > data from vb.net 2005. First of all, I don't see the point why you're asking this question in an Access newsgroups. Further more, you should really be more spefific... mfG --> stefan <-- ...

How to select query fields based on Combo box?
Greeting, I have a table which has 5 fields, ID, Name, Age, School and Class. I have a combo box which shows the fields of a Query. This combo is located in form which presents all the fields of the table. What I want to do is once the user selects a field for more than one the fields in form shown as selected. Also, I want to make a button for reshow all fields in form. Thank you in advance. ...

<> data query
I have two tables and both have a field called tag_id. The first table "my2003" has about 5000 records. The second table "monitor2003" is a subset of table "my2003" and has about 3000 records. I need help building a query that will give me the records in table "my2003" where the "tag_id" field is <> to the "tag_id" field in the "monitor2003" table. Also which type of joining of the two tables is needed? Use the query wizard to create an unmatch record query that will list all the records in my2003 but are n...

Different queries but the same?
Hi Everyone, Access 2003. I accidently double clicked on the wrong thing in a new query based on another query. In the query grid, I added the qryVentThpyWithinLastArea and double clicked on the *. It only filled one column of my grid but when I ran the query, it showed all the fields from the query. I then dragged down Area field and added my criteria. I had been taught to double click on the blue title bar and then drag all the fields to the grid then add my criteria. Both ways give me the same data. What is the differnce? I pasted the sql below so you can see what's going...

can send but can receive- event log shows loop within Exchange
Hi all, When I try to send email to my exchange 2003 server from an external email account I never get the email. I get the following error message in my event log. ------------------------ A non-delivery report with a status code of 5.3.5 was generated for recipient rfc822;adrown@[192.168.2.249] (Message-ID <200411090532.iA95WemV015823@gatekeeper.com>). Causes: A looping condition was detected. (The server is configured to route mail back to itself). If you have multiple SMTP Virtual Servers configured on your Exchange server, make sure they are defined by a unique incoming port and t...

Event ID 9554
Hello, I"m getting the following error: Event Type: Warning Event Source: MSExchangeIS Event Category: General Event ID: 9554 Date: 10/11/2005 Time: 1:33:15 PM User: N/A Computer: !@#$!# Description: Unable to update Mailbox SD in the DS. Mailbox Guid: 3b5b90b3-9fcd-4540-9858-d13d6498e9e1. Error Code 0x8004010f For more information, click http://www.microsoft.com/contentredirect.asp. ------------------------------------------------------------------------------------------------ 3b 5b 90 b3 - 9fcd - 4540 -9858 - d13d6498e9e1 \b3\90\5b\3b\cd\9f\40\45\98\58\d1\3d\64\98\e9\e1 (msE...

Domain name not always needed to log into OWA?
This is something I've wondered about for a while. Why is it that only some of our new Exchange Server installs insist on the OWA login <up to 13 chars. of domain name>\<user name> while others have no trouble with only <user name>? "Julie" <julie@somewhere.org> wrote: >This is something I've wondered about for a while. > >Why is it that only some of our new Exchange Server installs insist on >the OWA login <up to 13 chars. of domain name>\<user name> while >others have no trouble with only <user name>? Probably b...

trim in query
Hi All I am trying to trim a leading space at the start of each field in my "Customers" table which is an Exel spreadsheet imported using "TransferSpreadsheet" After researching the internet I have been able to get this to work using, for example: CustomerName: Trim([F3]) in the Field line of a select query ("CustomersTrimQry"). My promlem is that when I append the data from "CustomersTrimQry" to the "Customers" table the space returns. Prior to using trim I ran 3 queries from the original "CustomersImport" table, "C...

Database SQL query
Sorry for this post here. If someone knows a group I can go to for this question, please let me know. I have a program in MFC that accesses and updates an Access database. The problem is I can't figure out how to add a field which contains a word with a single apostrophe ie (St. Vincent's). I'm using the CDaoDatabase and CDaoRecordset classes. I understand that DAO is interpreting the apostrophe as some type of terminator but there must be a way around the issue. MS Access has information on how to do it in Access VB but that doesn't seem to work in MFC. Thanks Ughh ...

why getting event 9551 warnings?
I thought that when you switched to native mode (which we have) that these problems with zombie ACL's went away. Why are we still getting these errors? (running Exch 2003 SP1) Thx, J. ...

Creating Event procedures from a macro
Hi, I'm using Jon Peltier's workaround (to Excel's inability to create hyperlinks to chart sheets) to create a table of contents. The following event procedure is placed in the code module for the "contents" sheet. It activates the chart sheet when the user selects the linked cell: ' Thank you Jon! Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Not Intersect(Target, Range("B2")) Is Nothing Then Charts("Chart1").Activate End If End Sub This works fine, except that I need to create it on the fly from within a ma...

MS query and Firebird
I am accessing a Firebird data base with MS Query into Excel. I am trying to change the column heading (column name) but as I writte a "Newname" in Column Heading MS Query dont accept. I try to change directlly the SQL statement with "AS" clause and without "AS" clause but MS Query dont accept. I dont know if the format of select statement is different in Firebird data base or is a problem with MS Query. JC. ...

What event does a hotkey generate?
All, I have a date field in a form that has vba code attached to the 'after update' event. Then I setup a hotkey to auto the current date in the same field. The problem I am having is that when I hit the hotkey sequence the field is populated with the current date - however my vba code does not work. Any idea what event the population of the field by a hotkey produces? Thanks for you help. On Tue, 15 Jan 2008 11:30:00 -0800, Tom <Tom@discussions.microsoft.com> wrote: None. And for good reason. Programmatic filling of fields typically does not trigger any event. So you rewrite...

Event Handling
Hello, I have a project that creates 18 CBitmapButtons. As you know CBitmapButtons cannot be created (or at least to my knowledge) from adding the componet to the form. So I decided to create 18 CBitmapButtons in my code to create the buttons. Here is the problem... I need to write an event handler for these 18 buttons, and since there isn't the convenice of the event handling that you will find when you are adding componets to the form, I cannot figure out how to manually add event handlers.. Here is some of the declarations I made: CBitmapButton* Button1 = new CBitmapButton(); Button...

Project Manager 2007 queries
I am considering purchasing Proect Manager for my my Planner, we are a small office who a familiar with the basics but have a few queries which are a little more detailed, I hope someone may able to advise on:- 1. Reporting - What are the options for importing and exporting documents and the number of format types, are they clear and easy to learn and use ? 2. Graphs - Is graphical data readily available, are there differing options of graphs and are the tools for producing them clear and easy to use ? 3. Sand pits - Are there areas where 'offline' working is availabl...

UDF XLA and SQL queries
Newbie question. Apologies in advance if it's too simplistic or in the wrong forum. I want to add an UDF to Excel. This UDF queries a SQL database. Say the function name is 'MyFunc'; I want to be able to have (in a cell) =MyFunc("ABC") return some data from the SQL database (for example here, say the Product Description for product "ABC"). The user needs to select the database the first time he uses the workbook. The UDF is called often in the worksheets of a given workbook so I would prefer to open the connection once at the beginning and...