Re: Updating a database



You may want to make an update utility in VB6 like I did, although the one I
made was not for a DB update. In my case, the App runs Update.exe with
command line parameters and exits. Update.exe waits for the main App to exit
by using GetExitCodeProcess(), then using DoEvents for a given number of
seconds(from the command line), and does the update, then it executes the
main App after the update. I pass the process ID, number of seconds to wait,
EXE filename to run after success, and EXE filename to run after failure.
The filenames do not have spaces, nor I include the path because the command
line function I am using does not support inclosing a path with quotes. To
run the app after update, I use "App.Path & "\" & EXEName".

Here is a code that handles the command line that I used, see the Command
Function Example:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbenlr98/html/vafctcommandx.asp

Or just press F1 in VB6 while the cursor is on "Command" and click on
Example...


When checking if a file is in use, renaming it to see if it's in use doesn't
work with XP. I had to copy the file first(using FileCopy), and delete the
original(using Kill), I get a runtime error if the file is in use. This
difference in behavior as opposed to Windows 98 is not expected by many, but
it's true. If you don't believe me, get a file, like MS Paint. Copy it to a
temp folder, run it, then rename the file while it's in use using Windows
Explorer. In Windows 98, you can't, in Windows XP, you can. Now try to
delete the file, both will show an error!

There is a freeware utility that tells you if a file is in use or not, I
couldn't locate it now, but it's in the following site:

http://www.sysinternals.com/


"Ivan Debono" <ivanmdeb@xxxxxxxxxxx> wrote in message
news:uhKE1VisFHA.2936@xxxxxxxxxxxxxxxxxxxxxxx
> Hi all,
>
> This problem is not indirectly related to VB only because my application
> is
> written in VB6, whilst the backend is an Access database. The database is
> also versioned, ie. has a table 'id' with a column 'version'
>
> I have the following scenario:
> User A and User B install first version of the application. Version 1.0
> I do changes to the app and the database (add fields, change queries,
> etc...). Version 1.1
> User A updates to Version 1.1
> I do changes to the app and the database (add fields, change queries,
> etc...). Version 1.2
> User A updates to Version 1.2
> User B updates to Version 1.2 from Version 1.0
>
> Updates/patches will be downloaded for the internet or emailed. Updating
> the
> application is easy with InstallShield.
>
> But how can I implement a method to make updating a database from version
> x
> to version y as easy as possible? Are there standard patch methods used or
> do people develop their own?
>
> Thanks,
> Ivan
>
>


.



Relevant Pages

  • Re: Controlling Access Window Size
    ... via any command line or shortcut you use to start ... In your small app you ... Does a seperate instance of Access ... How does one tell the database to run ...
    (microsoft.public.access.setupconfig)
  • Re: Updating a database
    ... This will come in handy when I need to make App updates. ... > command line parameters and exits. ... whilst the backend is an Access database. ... >> I do changes to the app and the database (add fields, change queries, ...
    (microsoft.public.vb.general.discussion)
  • Re: Portable Database Choice
    ... I searched this group quite a bit looking for database alternatives and did find the options below from this search. ... I'm posting this in the hope it can be of use to other developers in a position similar to mine where I needed a low cost alternative to Pocket Access. ... One app requires synchronization between desktop and mobile device, the other requires a push of data from the desktop to mobile. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Portable Database Choice
    ... > database alternatives and did find the options below from this search. ... One app requires ... > push of data from the desktop to mobile. ... > Both of these apps used Pocket Access on the device with Peter Foot's ...
    (microsoft.public.dotnet.framework.compactframework)
  • Portable Database Choice
    ... database alternatives and did find the options below from this search. ... of data from the desktop to mobile. ... The read-only app requires speedy lookup of data in a flat table ... Both of these apps used Pocket Access on the device with Peter Foot's ...
    (microsoft.public.dotnet.framework.compactframework)