Start database ved AT.exe

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jj

    #1

    Start database ved AT.exe

    Hi Ng

    When I use the AT.exe to schedule a job and I write:
    at.exe 22:54 /every:24 "c:\test.ba t" this job works just perfect.

    In the bat file I have wrote:

    copy c:\TestDB.mdb c:\testfolder (I copy the Test database from C to
    C:\testfolder)

    Then when I Change the test.bat file to:

    "C:\Programmer\ Microsoft Office\OFFICE11 \msaccess.exe" "C:\TestDB. mdb" (I
    activate the test database) - This doesn't work!!!!

    It works when I double click the bat-file

    TIA
    jj


  • Randy Harris

    #2
    Re: Start database ved AT.exe

    * jj:[color=blue]
    > Hi Ng
    >
    > When I use the AT.exe to schedule a job and I write:
    > at.exe 22:54 /every:24 "c:\test.ba t" this job works just perfect.
    >
    > In the bat file I have wrote:
    >
    > copy c:\TestDB.mdb c:\testfolder (I copy the Test database from C to
    > C:\testfolder)
    >
    > Then when I Change the test.bat file to:
    >
    > "C:\Programmer\ Microsoft Office\OFFICE11 \msaccess.exe" "C:\TestDB. mdb" (I
    > activate the test database) - This doesn't work!!!!
    >
    > It works when I double click the bat-file
    >
    > TIA
    > jj
    >
    >[/color]

    This is a complete guess, but maybe worth a try. Put the TestDB.mdb in
    a directory. (c:\temp\TestDB .mdb). Maybe the Scheduler has trouble
    writing to C:\. That would explain why it works for a logged in user.

    --
    Randy Harris
    tech at promail dot com
    I'm pretty sure I know everything that I can remember.

    Comment

    • jj

      #3
      Re: Start database ved AT.exe

      Thanks Randy

      Unfortunately it doesn't work :-(

      /Jj
      "Randy Harris" <please@send.no .spam> skrev i en meddelelse
      news:dn5dg.8430 7$H71.48696@new ssvr13.news.pro digy.com...[color=blue]
      >* jj:[color=green]
      >> Hi Ng
      >>
      >> When I use the AT.exe to schedule a job and I write:
      >> at.exe 22:54 /every:24 "c:\test.ba t" this job works just perfect.
      >>
      >> In the bat file I have wrote:
      >>
      >> copy c:\TestDB.mdb c:\testfolder (I copy the Test database from C to
      >> C:\testfolder)
      >>
      >> Then when I Change the test.bat file to:
      >>
      >> "C:\Programmer\ Microsoft Office\OFFICE11 \msaccess.exe" "C:\TestDB. mdb"
      >> (I activate the test database) - This doesn't work!!!!
      >>
      >> It works when I double click the bat-file
      >>
      >> TIA
      >> jj
      >>
      >>[/color]
      >
      > This is a complete guess, but maybe worth a try. Put the TestDB.mdb in a
      > directory. (c:\temp\TestDB .mdb). Maybe the Scheduler has trouble writing
      > to C:\. That would explain why it works for a logged in user.
      >
      > --
      > Randy Harris
      > tech at promail dot com
      > I'm pretty sure I know everything that I can remember.[/color]


      Comment

      • PBsoft

        #4
        Re: Start database ved AT.exe

        > "C:\Programmer\ Microsoft Office\OFFICE11 \msaccess.exe" "C:\TestDB. mdb"[color=blue]
        > (I activate the test database) - This doesn't work!!!!
        >
        > It works when I double click the bat-file[/color]

        Try to change that line in the batch file, preceding it with the CALL batch
        statement.

        --
        PBsoft di Gabriele Bertolucci

        skype: pbsoftsolution


        Comment

        • david epsom dot com dot au

          #5
          Re: Start database ved AT.exe

          Yes, Access does not work well with AT.

          Either use a different scheduler (which will allow
          you to run as a full user), or don't use Access.

          Speaking of which, why open a GUI using a scheduler?

          You probably want to script DAO or ADO, not Access.

          (david)

          "jj" <jj@get2net.d k> wrote in message
          news:4474c994$0 $139$edfadb0f@d read11.news.tel e.dk...[color=blue]
          > Hi Ng
          >
          > When I use the AT.exe to schedule a job and I write:
          > at.exe 22:54 /every:24 "c:\test.ba t" this job works just perfect.
          >
          > In the bat file I have wrote:
          >
          > copy c:\TestDB.mdb c:\testfolder (I copy the Test database from C to
          > C:\testfolder)
          >
          > Then when I Change the test.bat file to:
          >
          > "C:\Programmer\ Microsoft Office\OFFICE11 \msaccess.exe" "C:\TestDB. mdb" (I
          > activate the test database) - This doesn't work!!!!
          >
          > It works when I double click the bat-file
          >
          > TIA
          > jj
          >
          >[/color]


          Comment

          • jj

            #6
            Re: Start database ved AT.exe

            Hi david

            I need to start a database every night, which (when activated) opens another
            database and calls a module where some data is imported calculated etc. Here
            after the second database is closed, and compressed by the first database,
            which is then closed.

            When I schedule it from windows scheduler it works fine, but this method
            requires that a specific user is logged on.

            I have also tried to use VB NT service, but again i have problems activating
            the database.

            /jj
            "david epsom dot com dot au" <david@epsomdot comdotau> skrev i en meddelelse
            news:44757305$0 $27828$c30e37c6 @lon-reader.news.tel stra.net...[color=blue]
            > Yes, Access does not work well with AT.
            >
            > Either use a different scheduler (which will allow
            > you to run as a full user), or don't use Access.
            >
            > Speaking of which, why open a GUI using a scheduler?
            >
            > You probably want to script DAO or ADO, not Access.
            >
            > (david)
            >
            > "jj" <jj@get2net.d k> wrote in message
            > news:4474c994$0 $139$edfadb0f@d read11.news.tel e.dk...[color=green]
            >> Hi Ng
            >>
            >> When I use the AT.exe to schedule a job and I write:
            >> at.exe 22:54 /every:24 "c:\test.ba t" this job works just perfect.
            >>
            >> In the bat file I have wrote:
            >>
            >> copy c:\TestDB.mdb c:\testfolder (I copy the Test database from C to
            >> C:\testfolder)
            >>
            >> Then when I Change the test.bat file to:
            >>
            >> "C:\Programmer\ Microsoft Office\OFFICE11 \msaccess.exe" "C:\TestDB. mdb"
            >> (I activate the test database) - This doesn't work!!!!
            >>
            >> It works when I double click the bat-file
            >>
            >> TIA
            >> jj
            >>
            >>[/color]
            >
            >[/color]


            Comment

            • jj

              #7
              Re: Start database ved AT.exe

              Hi

              Thanks for your answer, but I'm not sure what you mean - do you mean That I
              should just write: call "C:\Programmer\ Microsoft
              Office\OFFICE11 \msaccess.exe" "C:\TestDB. mdb"
              Instead of
              "C:\Programmer\ Microsoft Office\OFFICE11 \msaccess.exe" "C:\TestDB. mdb"
              ?

              /jj
              "PBsoft" <info@REMOVEpbs oft.it> skrev i en meddelelse
              news:875ea35524 d4d8c84df391369 0fe@news.tin.it ...[color=blue][color=green]
              >> "C:\Programmer\ Microsoft Office\OFFICE11 \msaccess.exe" "C:\TestDB. mdb"
              >> (I activate the test database) - This doesn't work!!!!
              >>
              >> It works when I double click the bat-file[/color]
              >
              > Try to change that line in the batch file, preceding it with the CALL
              > batch statement.
              >
              > --
              > PBsoft di Gabriele Bertolucci
              > www.pbsoft.it
              > skype: pbsoftsolution
              >
              >[/color]


              Comment

              • PBsoft

                #8
                Re: Start database ved AT.exe

                > Thanks for your answer, but I'm not sure what you mean - do you mean[color=blue]
                > That I
                > should just write: call "C:\Programmer\ Microsoft
                > Office\OFFICE11 \msaccess.exe" "C:\TestDB. mdb"
                > Instead of
                > "C:\Programmer\ Microsoft Office\OFFICE11 \msaccess.exe" "C:\TestDB. mdb"
                > ?[/color]

                Yes.

                --
                PBsoft di Gabriele Bertolucci

                skype: pbsoftsolution


                Comment

                • david epsom dot com dot au

                  #9
                  Re: Start database ved AT.exe

                  > When I schedule it from windows scheduler it works fine, but this method[color=blue]
                  > requires that a specific user is logged on.[/color]

                  Yes, Access requires that a specific user is logged on. You can't
                  use AT because it does not provide that capability.

                  It sounds like you should be using DAO or ADO/ADOX to import,
                  calculate, and compress.

                  (david)

                  "jj" <jj@get2net.d k> wrote in message
                  news:4475edc0$0 $158$edfadb0f@d read11.news.tel e.dk...[color=blue]
                  > Hi david
                  >
                  > I need to start a database every night, which (when activated) opens
                  > another database and calls a module where some data is imported calculated
                  > etc. Here after the second database is closed, and compressed by the first
                  > database, which is then closed.
                  >
                  > When I schedule it from windows scheduler it works fine, but this method
                  > requires that a specific user is logged on.
                  >
                  > I have also tried to use VB NT service, but again i have problems
                  > activating the database.
                  >
                  > /jj
                  > "david epsom dot com dot au" <david@epsomdot comdotau> skrev i en
                  > meddelelse news:44757305$0 $27828$c30e37c6 @lon-reader.news.tel stra.net...[color=green]
                  >> Yes, Access does not work well with AT.
                  >>
                  >> Either use a different scheduler (which will allow
                  >> you to run as a full user), or don't use Access.
                  >>
                  >> Speaking of which, why open a GUI using a scheduler?
                  >>
                  >> You probably want to script DAO or ADO, not Access.
                  >>
                  >> (david)
                  >>
                  >> "jj" <jj@get2net.d k> wrote in message
                  >> news:4474c994$0 $139$edfadb0f@d read11.news.tel e.dk...[color=darkred]
                  >>> Hi Ng
                  >>>
                  >>> When I use the AT.exe to schedule a job and I write:
                  >>> at.exe 22:54 /every:24 "c:\test.ba t" this job works just perfect.
                  >>>
                  >>> In the bat file I have wrote:
                  >>>
                  >>> copy c:\TestDB.mdb c:\testfolder (I copy the Test database from C to
                  >>> C:\testfolder)
                  >>>
                  >>> Then when I Change the test.bat file to:
                  >>>
                  >>> "C:\Programmer\ Microsoft Office\OFFICE11 \msaccess.exe" "C:\TestDB. mdb"
                  >>> (I activate the test database) - This doesn't work!!!!
                  >>>
                  >>> It works when I double click the bat-file
                  >>>
                  >>> TIA
                  >>> jj
                  >>>
                  >>>[/color]
                  >>
                  >>[/color]
                  >
                  >[/color]


                  Comment

                  • jj

                    #10
                    Re: Start database ved AT.exe

                    Hi David

                    Thanks for your answer. I'm not realy sure what you mean - can you specify
                    it a little bit, or give me a hint to where I can find some examples.?

                    /jj
                    "david epsom dot com dot au" <david@epsomdot comdotau> skrev i en meddelelse
                    news:447651d4$0 $27831$c30e37c6 @lon-reader.news.tel stra.net...[color=blue][color=green]
                    >> When I schedule it from windows scheduler it works fine, but this method
                    >> requires that a specific user is logged on.[/color]
                    >
                    > Yes, Access requires that a specific user is logged on. You can't
                    > use AT because it does not provide that capability.
                    >
                    > It sounds like you should be using DAO or ADO/ADOX to import,
                    > calculate, and compress.
                    >
                    > (david)
                    >
                    > "jj" <jj@get2net.d k> wrote in message
                    > news:4475edc0$0 $158$edfadb0f@d read11.news.tel e.dk...[color=green]
                    >> Hi david
                    >>
                    >> I need to start a database every night, which (when activated) opens
                    >> another database and calls a module where some data is imported
                    >> calculated etc. Here after the second database is closed, and compressed
                    >> by the first database, which is then closed.
                    >>
                    >> When I schedule it from windows scheduler it works fine, but this method
                    >> requires that a specific user is logged on.
                    >>
                    >> I have also tried to use VB NT service, but again i have problems
                    >> activating the database.
                    >>
                    >> /jj
                    >> "david epsom dot com dot au" <david@epsomdot comdotau> skrev i en
                    >> meddelelse news:44757305$0 $27828$c30e37c6 @lon-reader.news.tel stra.net...[color=darkred]
                    >>> Yes, Access does not work well with AT.
                    >>>
                    >>> Either use a different scheduler (which will allow
                    >>> you to run as a full user), or don't use Access.
                    >>>
                    >>> Speaking of which, why open a GUI using a scheduler?
                    >>>
                    >>> You probably want to script DAO or ADO, not Access.
                    >>>
                    >>> (david)
                    >>>
                    >>> "jj" <jj@get2net.d k> wrote in message
                    >>> news:4474c994$0 $139$edfadb0f@d read11.news.tel e.dk...
                    >>>> Hi Ng
                    >>>>
                    >>>> When I use the AT.exe to schedule a job and I write:
                    >>>> at.exe 22:54 /every:24 "c:\test.ba t" this job works just perfect.
                    >>>>
                    >>>> In the bat file I have wrote:
                    >>>>
                    >>>> copy c:\TestDB.mdb c:\testfolder (I copy the Test database from C to
                    >>>> C:\testfolder)
                    >>>>
                    >>>> Then when I Change the test.bat file to:
                    >>>>
                    >>>> "C:\Programmer\ Microsoft Office\OFFICE11 \msaccess.exe" "C:\TestDB. mdb"
                    >>>> (I activate the test database) - This doesn't work!!!!
                    >>>>
                    >>>> It works when I double click the bat-file
                    >>>>
                    >>>> TIA
                    >>>> jj
                    >>>>
                    >>>>
                    >>>
                    >>>[/color]
                    >>
                    >>[/color]
                    >
                    >[/color]


                    Comment

                    • pietlinden@hotmail.com

                      #11
                      Re: Start database ved AT.exe

                      you might check out workspace and opendatabase in the help...

                      Comment

                      • david epsom dot com dot au

                        #12
                        Re: Start database ved AT.exe

                        for example, using VBS

                        dim dbe
                        dim db
                        set dbe = createobject("d ao.dbengine.36" )
                        set db = db.opendatabase ("a.mdb")
                        db.Execute "MyAppendQu ery"
                        dbe.CompactData base "a.mdb","b. mdb"

                        (david)


                        "jj" <jj@get2net.d k> wrote in message
                        news:44768f16$0 $198$edfadb0f@d read11.news.tel e.dk...[color=blue]
                        > Hi David
                        >
                        > Thanks for your answer. I'm not realy sure what you mean - can you specify
                        > it a little bit, or give me a hint to where I can find some examples.?
                        >
                        > /jj
                        > "david epsom dot com dot au" <david@epsomdot comdotau> skrev i en
                        > meddelelse news:447651d4$0 $27831$c30e37c6 @lon-reader.news.tel stra.net...[color=green][color=darkred]
                        >>> When I schedule it from windows scheduler it works fine, but this method
                        >>> requires that a specific user is logged on.[/color]
                        >>
                        >> Yes, Access requires that a specific user is logged on. You can't
                        >> use AT because it does not provide that capability.
                        >>
                        >> It sounds like you should be using DAO or ADO/ADOX to import,
                        >> calculate, and compress.
                        >>
                        >> (david)
                        >>
                        >> "jj" <jj@get2net.d k> wrote in message
                        >> news:4475edc0$0 $158$edfadb0f@d read11.news.tel e.dk...[color=darkred]
                        >>> Hi david
                        >>>
                        >>> I need to start a database every night, which (when activated) opens
                        >>> another database and calls a module where some data is imported
                        >>> calculated etc. Here after the second database is closed, and compressed
                        >>> by the first database, which is then closed.
                        >>>
                        >>> When I schedule it from windows scheduler it works fine, but this method
                        >>> requires that a specific user is logged on.
                        >>>
                        >>> I have also tried to use VB NT service, but again i have problems
                        >>> activating the database.
                        >>>
                        >>> /jj
                        >>> "david epsom dot com dot au" <david@epsomdot comdotau> skrev i en
                        >>> meddelelse news:44757305$0 $27828$c30e37c6 @lon-reader.news.tel stra.net...
                        >>>> Yes, Access does not work well with AT.
                        >>>>
                        >>>> Either use a different scheduler (which will allow
                        >>>> you to run as a full user), or don't use Access.
                        >>>>
                        >>>> Speaking of which, why open a GUI using a scheduler?
                        >>>>
                        >>>> You probably want to script DAO or ADO, not Access.
                        >>>>
                        >>>> (david)
                        >>>>
                        >>>> "jj" <jj@get2net.d k> wrote in message
                        >>>> news:4474c994$0 $139$edfadb0f@d read11.news.tel e.dk...
                        >>>>> Hi Ng
                        >>>>>
                        >>>>> When I use the AT.exe to schedule a job and I write:
                        >>>>> at.exe 22:54 /every:24 "c:\test.ba t" this job works just perfect.
                        >>>>>
                        >>>>> In the bat file I have wrote:
                        >>>>>
                        >>>>> copy c:\TestDB.mdb c:\testfolder (I copy the Test database from C to
                        >>>>> C:\testfolder)
                        >>>>>
                        >>>>> Then when I Change the test.bat file to:
                        >>>>>
                        >>>>> "C:\Programmer\ Microsoft Office\OFFICE11 \msaccess.exe" "C:\TestDB. mdb"
                        >>>>> (I activate the test database) - This doesn't work!!!!
                        >>>>>
                        >>>>> It works when I double click the bat-file
                        >>>>>
                        >>>>> TIA
                        >>>>> jj
                        >>>>>
                        >>>>>
                        >>>>
                        >>>>
                        >>>
                        >>>[/color]
                        >>
                        >>[/color]
                        >
                        >[/color]


                        Comment

                        Working...