Re: Updating a database
- From: "Someone" <nobody@xxxxxxx>
- Date: Tue, 6 Sep 2005 12:21:55 -0400
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
>
>
.
- Follow-Ups:
- Re: Updating a database
- From: Ivan Debono
- Re: Updating a database
- References:
- Updating a database
- From: Ivan Debono
- Updating a database
- Prev by Date: Shell Command Doesn't Create TXT file as expected
- Next by Date: Re: Lost VB6.0 Professional CD
- Previous by thread: Re: Updating a database
- Next by thread: Re: Updating a database
- Index(es):
Relevant Pages
|