473,657 Members | 2,397 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Execute a function at database startup ... how?

Hi. I want to execute a routine, at database startup time, to relink
the backend tables. I have the code for the function, but I don't know
where to invoke it. I tried putting a call to the function in the Open
Event of the MainMenu (which gets displayed at Startup). That seems to
be too late, because I get an error that says that it can't find the
tables (I moved the backend file to a different folder, for testing of
this function).

What event is "kicked off" when the database starts up?

TIA.

Regards,
SueB

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #1
7 6805
My aplogies for the duplicate post. My system went weird here at work
and I didn't know if the original got posted or not. I don't think that
I can delete this post. So, again, my apologies.

Regards,
SueB

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #2
SueB wrote:
Hi. I want to execute a routine, at database startup time, to relink
the backend tables. I have the code for the function, but I don't know
where to invoke it. I tried putting a call to the function in the Open
Event of the MainMenu (which gets displayed at Startup). That seems to
be too late, because I get an error that says that it can't find the
tables (I moved the backend file to a different folder, for testing of
this function).

What event is "kicked off" when the database starts up?

TIA.

Regards,
SueB

*** Sent via Developersdex http://www.developersdex.com ***


See my reply in your other message
Nov 13 '05 #3
The autoexec macro would run first.

You can use the RunCode command to have it run a function (if it's a Sub,
you'll have to either change it to a public function or create a Sub that
calls it).

HTH,

Bruce

"SueB" <sl*****@verizo n.net> wrote in message
news:OE******** *******@news.us west.net...
Hi. I want to execute a routine, at database startup time, to relink
the backend tables. I have the code for the function, but I don't know
where to invoke it. I tried putting a call to the function in the Open
Event of the MainMenu (which gets displayed at Startup). That seems to
be too late, because I get an error that says that it can't find the
tables (I moved the backend file to a different folder, for testing of
this function).

What event is "kicked off" when the database starts up?

TIA.

Regards,
SueB

*** Sent via Developersdex http://www.developersdex.com ***

Nov 13 '05 #4
Bruce Rusk wrote:
The autoexec macro would run first.


Actually the Open, Load, and Current event of a form designated to open in
startup fire before the Autoexec macro.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #5
That's good to know.

In that case, to resolve the OP's problem, it might make sense to run the
necessary code from Autoexec first, then have Autoexec open the form,
instead of setting a startup form.

"Rick Brandt" <ri*********@ho tmail.com> wrote in message
news:iC******** ***********@new ssvr14.news.pro digy.com...
Bruce Rusk wrote:
The autoexec macro would run first.


Actually the Open, Load, and Current event of a form designated to open in
startup fire before the Autoexec macro.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com

Nov 13 '05 #6
Help ... I have the AutoExec macro calling a function to determine if we
should 'relink' the tables. I didn't really know how to do this, so I
put a variable in a table that I have for User Variables to gate whether
the Refresh Links should take place.

Of course this really won't work if the links have been broken because
the table won't be there. But I forged ahead just to give is try (with
the Back-end and Front-end where there are expected to be).
Unfortunately, when I try to get the variable value (the switch = Y or
N) I get an error that says that I "canceled the previous operation".
Wow - this has got me stumped.

I want to ONLY refresh the links if, when the database opens it can't
find the tables. I want it to be executed via VB code. I like the idea
of the database opening with AutoExec Macro which will run code to
refresh the links and then OpenForm for the MainMenu window.

Any ideas would be REALLY appreciated.

Thanks.
SueB

Regards,
SueB

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #7
hey

if you use ACCESS DATA PROJECTS then you dont have to worry about all
this re-linking BS

no linked tables; all the queries are stored in SQL Server-- it's just
a much better solution

Nov 13 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
4950
by: Penn Markham | last post by:
Hello all, I am writing a script where I need to use the system() function to call htpasswd. I can do this just fine on the command line...works great (see attached file, test.php). When my webserver runs that part of the script (see attached file, snippet.php), though, it doesn't go through. I don't get an error message or anything...it just returns a "1" (whereas it should return a "0") as far as I can tell. I have read the PHP...
2
1810
by: Indrek Mägi | last post by:
How execute extended proc on stopping ms sql server (it mean before stoping). Is it possible to handle this? Or is in system proc a'la sp_on_stop? Thx
1
2326
by: pginfo | last post by:
Hi, I have had two times problem with pg database corruption. My system: Dual athlon 2.4 1 GB RAM, linux red hat 7.3 reiserFS Also on the system I have cron that every 3 h. make dump and every 24 h.
0
2597
by: xixi | last post by:
hi, we are using db2 udb v8.1 on win 64 bit with fp3 with type 4 db2jcc.jar driver. when i execute this query , select id, arno01, arcd01, arno16, artx01, armo09, ardy09, arcc09, aryr09, arnm03, armo53, ardy53, arcc53, aryr53, arcd64, arid02 from NJIPD.ARLTNT2 WHERE arno01=13962 ORDER BY arno01 ASC, arcd01 ASC (one where clause)
4
2852
by: Dalan | last post by:
Perhaps someone can share information on the methods to use to effect the automation process of creating the property to set the AllowBypassKey function. I was directed to: http://www.mvps.org/access/general/gen0040.htm and downloaded the function module that includes setting the fourth DDL part to true. It initially failed to compile using Access 97 because "PropType As DAO.DataTypeEnum" is not an automation type that Visual Basic...
3
9801
by: Lyle Fairfield | last post by:
MS-SQL Server utilities Enterprise Manager and Query Analyzer will model almost any MS-SQL object as a simple script file with a default ".sql" extension. But how to "run these files? They are in a slightly modifies character set and contain commands only usable by the Server's SQL utilities. If one tries to use them on a machine which does not have the SQL utilities installed, one seems to have a laborious cut-and-paste task. (Of...
5
6843
by: SueB | last post by:
Hi. I want to execute a routine, at database startup time, to relink the backend tables. I have the code for the function, but I don't know where to invoke it. I tried putting a call to the function in the Open Event of the MainMenu (which gets displayed at Startup). That seems to be too late, because I get an error that says that it can't find the tables (I moved the backend file to a different folder, for testing of this function). ...
1
3575
by: =?Utf-8?B?S2Vubnk=?= | last post by:
I have one bat file that contains a command to startup Java Program. Then, I would like to create a cluster job to call the bat file. In case of one computer is down, another computer can also call the bat file and startup my Java Program. For this purpose, I have tried to place the bat file into share drive of two computers which are cluster machine. Also, I used Generic Application to create a job to call my bat file and this job is...
3
4885
by: fniles | last post by:
In the Windows application (using VB.NET 2005) I use connection pooling like the following: In the main form load I open a connection using a connection string that I stored in a global variable g_sConnectionString and leave this connection open and not close it until it exits the application. Then on each thread/each subsequent sub that needs the connection I create a local OleDBConnection variable, open the connection using the exact...
0
8312
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8827
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8504
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8606
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7337
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6169
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
1622
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.