473,322 Members | 1,287 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,322 software developers and data experts.

MSAccess determine if running unattended / batch

We have a W2K / Access2K environment where recent maintenance has prevented the /X commandline switch from starting macro's.

We have several "batch" processes that run at night using the task scheduler and are started via simple macro's to run the code.

Is there a way I can determine if I am running "disconnected" so I can use an autoexec macro to determine if I shoud be doing "batch" things or open as usual for a user?

Or, is there a reg hack to allow command line /x macros to run?

TIA
Sep 13 '07 #1
2 2066
Scott Price
1,384 Expert 1GB
We have a W2K / Access2K environment where recent maintenance has prevented the /X commandline switch from starting macro's.

We have several "batch" processes that run at night using the task scheduler and are started via simple macro's to run the code.

Is there a way I can determine if I am running "disconnected" so I can use an autoexec macro to determine if I shoud be doing "batch" things or open as usual for a user?

Or, is there a reg hack to allow command line /x macros to run?

TIA
Have a look at this tutorial on how to check if any users are connected to the database...

http://www.thescripts.com/forum/thread684989.html

Regards,
Scott
Sep 14 '07 #2
ADezii
8,834 Expert 8TB
We have a W2K / Access2K environment where recent maintenance has prevented the /X commandline switch from starting macro's.

We have several "batch" processes that run at night using the task scheduler and are started via simple macro's to run the code.

Is there a way I can determine if I am running "disconnected" so I can use an autoexec macro to determine if I shoud be doing "batch" things or open as usual for a user?

Or, is there a reg hack to allow command line /x macros to run?

TIA
Is there a way I can determine if I am running "disconnected"
I'm not sure if this will work in your specific case, but you can give it a try.
Expand|Select|Wrap|Line Numbers
  1. 'First, set a Reference to the Microsoft ActiveX Data Objects X.X Library
  2. Dim intState As Integer
  3. Dim cnn As ADODB.Connection
  4.  
  5. Set cnn = CurrentProject.Connection
  6.  
  7. intState = cnn.State
  8.  
  9. Select Case intState
  10.   Case adStateClosed
  11.     MsgBox "Connection Closed"
  12.   Case adStateOpen
  13.     MsgBox "Connection Open"
  14. End Select
Sep 17 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

29
by: pb648174 | last post by:
I have a very long transaction that runs on the same database that other users need to use for existing data. I don't care if they see data from the transaction before it is done and am only using...
15
by: (Pete Cresswell) | last post by:
I've got a .BAT file that I use for executing various MS Access apps that I wrote way back in the days of 2.0. It's evolved over time, but it still contains a number of possible paths to...
0
by: Siegfried Heintze | last post by:
This program works fine on my desktop when I grant full control of the MSAccess database to everyone. However, when I put it on my hosting service with no impersonation, I now get this error (see...
0
by: MLH | last post by:
I've been unable to determine the correct setting to force a copy of msaccess.exe to be written to target disk during runtime installation process. It may be that the runtime installation...
1
by: Siegfried Heintze | last post by:
I have some cygwin cron jobs running under the Administrator account populating a MSAccess database that is simultaneously being queried by IIS/ASP.NET/C#. If I manually use windows explorer to...
3
by: steveeisen | last post by:
I'm a long-time VB6 programmer in a shop that is mostly moving to VB ..NET 2005. And I'm confused about coding the start of solutions for unattended operations. Much of what I write is old-time...
1
by: vikramrawal | last post by:
hi, I am using C# with MSAccess XP. I need to insert bulk of records around 10000 in MSAccess. So obviously if I inserts each record individually then it will take lot of time. By using...
2
by: sp | last post by:
I am looking for a files .net 1.1 .net 2.0 .net 3.0 that can I integrate with Windows XP installation CD for unattended install. I am looking for an patches for it also.
0
by: bbrewder | last post by:
I am struggling with some MSAccess automation issues. Basically, we have a .Net application that uses MSAccess for reporting (legacy code). We are able to launch MSAccess fine and even work with...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.