• WSStewart

    WSStewart

    @wsstewart

    Viewing 15 replies - 16 through 30 (of 151 total)
    Author
    Replies
    • in reply to: File Search and Shortcuts (office 97, XP & VB6) #862749

      Hans,

      Thank you. There is nothing like a simplistic solution to fix things, I will give it a go. blush

      Why a shortcut is returned still bothers me though. Do you have any idea why a filespec of *.mdb should return *.mdb and *.lnk where the target of the shortcut is a mdb?

      Is it possible to have a filespec with an exclusion eg *.mdb;*.mde;-*.lnk ?

      Cheers

      Stewart

    • in reply to: File Search and Shortcuts (office 97, XP & VB6) #862748

      Hans,

      Thank you. There is nothing like a simplistic solution to fix things, I will give it a go. blush

      Why a shortcut is returned still bothers me though. Do you have any idea why a filespec of *.mdb should return *.mdb and *.lnk where the target of the shortcut is a mdb?

      Is it possible to have a filespec with an exclusion eg *.mdb;*.mde;-*.lnk ?

      Cheers

      Stewart

    • in reply to: Searching records with accents or diacritics (A2K) #862722

      Mark,

      I don

    • in reply to: Searching records with accents or diacritics (A2K) #862723

      Mark,

      I don

    • in reply to: OleServerBusyTimeout (VB6) #857670

      for anyone who is interested.

      The Access conversion Reporting Tool was released. I downloaded it and looked with great interest to see how MS were going to handle this sort of scenario where the automation object fails to respond.

      They shell out and run their converter/scanner exe.
      They then get a handle to the app.
      This allows them to kill the instance after time out or user cancel.

      code snipits from scanner follow

              'build the command line, assume adscanner.exe is in my directory
              strCmdLine = """" & CurrentProject.Path
              If Right$(strCmdLine, 1)  "" Then strCmdLine = strCmdLine & ""
              strCmdLine = strCmdLine & "adscanner.exe"" "
                  
                  'calls out to the scanner tool
                  lTaskId = Shell(strCmdLine, vbHide)
                  If lTaskId = 0 Then
                      MsgBox "Error launching AdScanner!", vbOKOnly, "Error"
                      GoTo LExit
                  End If
                  
                  hProcess = OpenProcess(SYNCHRONIZE, False, lTaskId)
                  'if we can't get a process handle then assume adscanner is already done
                  If hProcess Then
                      'Keep waiting until the process ends or the user cancels
                      Do While (WaitForSingleObject(hProcess, 0) = WAIT_TIMEOUT) And (fStopScanning = False)
                          'Wait a second before we try again.
                          dtNextTryDate = DateAdd("s", 1, Now)
                          Do
                              DoEvents
                          Loop Until dtNextTryDate <= Now
                      Loop
                      CloseHandle hProcess
                  End If
      

      Oh well when the MS programmers have to do it this way, there is no hope for me.

      Stewart

    • in reply to: OleServerBusyTimeout (VB6) #857671

      for anyone who is interested.

      The Access conversion Reporting Tool was released. I downloaded it and looked with great interest to see how MS were going to handle this sort of scenario where the automation object fails to respond.

      They shell out and run their converter/scanner exe.
      They then get a handle to the app.
      This allows them to kill the instance after time out or user cancel.

      code snipits from scanner follow

              'build the command line, assume adscanner.exe is in my directory
              strCmdLine = """" & CurrentProject.Path
              If Right$(strCmdLine, 1)  "" Then strCmdLine = strCmdLine & ""
              strCmdLine = strCmdLine & "adscanner.exe"" "
                  
                  'calls out to the scanner tool
                  lTaskId = Shell(strCmdLine, vbHide)
                  If lTaskId = 0 Then
                      MsgBox "Error launching AdScanner!", vbOKOnly, "Error"
                      GoTo LExit
                  End If
                  
                  hProcess = OpenProcess(SYNCHRONIZE, False, lTaskId)
                  'if we can't get a process handle then assume adscanner is already done
                  If hProcess Then
                      'Keep waiting until the process ends or the user cancels
                      Do While (WaitForSingleObject(hProcess, 0) = WAIT_TIMEOUT) And (fStopScanning = False)
                          'Wait a second before we try again.
                          dtNextTryDate = DateAdd("s", 1, Now)
                          Do
                              DoEvents
                          Loop Until dtNextTryDate <= Now
                      Loop
                      CloseHandle hProcess
                  End If
      

      Oh well when the MS programmers have to do it this way, there is no hope for me.

      Stewart

    • in reply to: Database Security explained (2002) #857668

      Andrew,

      if you have secured databases prior to 2000 the major differences in XP are

      1. you can no longer set permissions for individual modules. You now set a password for the code project. This is available from Properties under the Tools menu in the VB project editor. Look on the protection tab.

      2. The admin user may no longer be identical across different MDW files ( I have not worked out if this has an impact yet).

      Stewart

    • in reply to: Database Security explained (2002) #857669

      Andrew,

      if you have secured databases prior to 2000 the major differences in XP are

      1. you can no longer set permissions for individual modules. You now set a password for the code project. This is available from Properties under the Tools menu in the VB project editor. Look on the protection tab.

      2. The admin user may no longer be identical across different MDW files ( I have not worked out if this has an impact yet).

      Stewart

    • in reply to: OleServerBusyTimeout (VB6) #857196

      Thanks for taking the time to read and reply Jan.

      That was just a sample of the type of thing I was looking for, in all honesty I don’t think that the code ever ran to completion, I kept killing it because my Automation Server just sat there and never generated the OleServerBusyTimeout Error that I was hoping for. Some days I just hate MS Office and MS in general. Other days im makes me say “Wow”. Such is life.

      I generally try to always exit at the Proc_Exit: section or whatever the designated exit point is for the procedure.

      Cheers

      Stewart

    • in reply to: OleServerBusyTimeout (VB6) #857197

      Thanks for taking the time to read and reply Jan.

      That was just a sample of the type of thing I was looking for, in all honesty I don’t think that the code ever ran to completion, I kept killing it because my Automation Server just sat there and never generated the OleServerBusyTimeout Error that I was hoping for. Some days I just hate MS Office and MS in general. Other days im makes me say “Wow”. Such is life.

      I generally try to always exit at the Proc_Exit: section or whatever the designated exit point is for the procedure.

      Cheers

      Stewart

    • in reply to: Mail Server (Access XP) #855071

      In a XP & notes environment I get

      ?GetDefaultMailClient()
      Outlook Express

      call TestGetMailClientSubkeys

      Hotmail;Lotus Notes;Outlook Express

      0 Hotmail
      1 Lotus Notes
      2 Outlook Express

    • in reply to: Mail Server (Access XP) #855072

      In a XP & notes environment I get

      ?GetDefaultMailClient()
      Outlook Express

      call TestGetMailClientSubkeys

      Hotmail;Lotus Notes;Outlook Express

      0 Hotmail
      1 Lotus Notes
      2 Outlook Express

    • in reply to: corrupt database flag (XP) #855069

      Thanks for that Hans,

      I found a vb class that let me enumerate all values under a specified key, except reg_Binary. The DisabledItems values are of type REG_BINARY which as you say is pretty horrible to get anything out of. I extended the class to add REG_Binary types and then added a little routine to strip the database name out of the value. It’s not pretty and it’s not perfect, but it does the job.

      HKEY_CURRENT_USERSoftwareMicrosoftOffice10.0AccessResiliencyDisabledItems is only applicable to XP, and if a file is deleted or moved the key is not updated so it’s not a very robust mechanism.

      I

    • in reply to: corrupt database flag (XP) #855070

      Thanks for that Hans,

      I found a vb class that let me enumerate all values under a specified key, except reg_Binary. The DisabledItems values are of type REG_BINARY which as you say is pretty horrible to get anything out of. I extended the class to add REG_Binary types and then added a little routine to strip the database name out of the value. It’s not pretty and it’s not perfect, but it does the job.

      HKEY_CURRENT_USERSoftwareMicrosoftOffice10.0AccessResiliencyDisabledItems is only applicable to XP, and if a file is deleted or moved the key is not updated so it’s not a very robust mechanism.

      I

    • in reply to: crosstab query and report (Access 2000 all updates) #853456

      The problem with opening recordsets on parameter queries is that you have to explicitly specify the parameter values for the query and then execute it.

      I’d be tempted to change your code to something like

      Private Sub Report_Open(Cancel As Integer)
      Dim intColCount As Integer
      Dim intControlCount As Integer
      Dim i As Integer
      Dim strName As String

      Dim myStr as string

      On Error Resume Next

      Dim rst As DAO.Recordset
      Dim db As DAO.Database

      mystr = “TRANSFORM Count(tblVolunteerSchedule.VolDate) AS CountOfVolDate”
      mystr = mystr & “SELECT tblVolunteers.LastName, tblVolunteers.FirstName”
      mystr = mystr & “FROM tblVolunteers LEFT JOIN tblVolunteerSchedule ON tblVolunteers.VolunteerID = tblVolunteerSchedule.VolunteerID”
      mystr = mystr & “WHERE (((tblVolunteerSchedule.VolDate) Between #”
      mystr = mystr & format([Start Date],”mm/dd/yyyy”) & “# And #” & format([End Date],”mm/dd/yyyy”) & “#))”
      mystr = mystr & “GROUP BY tblVolunteers.LastName, tblVolunteers.FirstName”
      mystr = mystr & “PIVOT tblVolunteerSchedule.VolDate;”

      Set db = CurrentDb
      Set rst = db.OpenRecordset(mystr)

      This will generate the query for you. You will have to replace the [StartDate] and [EndDate] with valid fields or values.

      otherwise have a look in the help for using the querydef object

      eg

      Set rst = query1.openrecordset

    Viewing 15 replies - 16 through 30 (of 151 total)