Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 7th, 2006, 04:25 AM
Authorized User
 
Join Date: May 2006
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default Batch File

Hi there. I am hopefully going to be using a batch file to automatically update my database with new records being generated on another machine. These updates will be sent by email.

Is there a way that i can have the batch file search for an update at start up and install these updates without relying on the user to upload the updates?

Im just gauging interest to see if this is possible. I have a basic batch file which searches for the appropriate front end to be used and i will update this accordingly.

Thank You

Allan

 
Old June 7th, 2006, 05:58 AM
Authorized User
 
Join Date: May 2006
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry. The updates are saved as a table.

 
Old June 7th, 2006, 06:50 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

You don't need a batch file. I do this with a splash form before my main form opens in some databases. The on load event of the splash file goes out and looks for a text file, and if there is anything in the text file it pulls it into the database, then overwrites the text file so that no dupes are made. You can save the text file to an archive folder before you overwrite it in case there are mistakes.

Then the splash file closes itself and opens the main form.

Is this what you are looking for? How are the updates packaged?



mmcdonal
 
Old June 7th, 2006, 06:58 AM
Authorized User
 
Join Date: May 2006
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yeah, this could be basically what im looking for. the updates are packaged in a table, and given a .fif tag to comly with out system. Right, off to find out how to write a splash file :D never heard of this before

 
Old June 7th, 2006, 08:59 AM
Authorized User
 
Join Date: May 2006
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

So do i basically create another form, Change this form to the main form. Add the timer and allow sufficient time to update, once it has updated route it back to the original form.

 
Old June 7th, 2006, 09:02 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

No, just create a splash form, have it load as the form loaded when the app opens (start up options) then put these actions on the splash form's on load event:

Check for file
Update database if found
Close splash form
Open main form

No need for timers since the process will not move on to the close and open events until the update event is finished.



mmcdonal
 
Old June 7th, 2006, 10:35 AM
Authorized User
 
Join Date: May 2006
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Micheal, sorry to be a PITA :D When i try to save the splash file it tells me that it is not in a valid format. I read a tutorial and it tells me to save it as formname.cs What file format should i put it in.

Thanks again

Allan

 
Old June 7th, 2006, 10:45 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Sorry, what I meant was, create a form in your Access database. This would be "frmSplash"

Then set your start up options to open this form first.

This form has on OnLoad event, which you use to update the database, close the splash form, and open your main form.

So it is all done within Access.



mmcdonal
 
Old June 8th, 2006, 03:36 AM
Authorized User
 
Join Date: May 2006
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Woo Hoo. I got the splash screen showing. But its got a border round it. I cant find the actual values to change this in the form design.

Here is the basic layout without any of the looking for update procedures included

Private Sub Form_Load()
Sub Main()
    ' Show the splash form
    Form_Splash.Show
    ' Load the main form
    Load Form_Main_Menu
    ' Load any other forms you may have that you need
    ' Show the main form
    Form_Main_Menu.Show
    ' Remove the splash form from the memory
    Unload frmSplash
End Sub


Allan
 
Old June 8th, 2006, 06:30 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I am not sure why you did it this way, but oh well. Go to the properties dialog box for the form and change the border style to Thin, or no border.

mmcdonal





Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help with DOS batch file .. Arul20 Forum and Wrox.com Feedback 5 August 31st, 2007 06:51 AM
Telnet dos batch file sridharaiyer Need help with your homework? 0 August 25th, 2006 03:38 PM
executing vb batch file pat933 VB How-To 0 May 14th, 2006 12:22 AM
Waiting for a batch file to finish fordrs3 Beginning VB 6 3 June 22nd, 2003 04:24 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.