473,407 Members | 2,315 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,407 software developers and data experts.

Kill Statement

AccessXP in Access2000 mode

I have the following code outline in a standard module in MyDatabase.mdb ---

Use CreateDatabase to create MyOtherDatabase.mdb
Use two make table queries to create two tables in MyOtherDatabase.mdb
Programatically zip MyOtherDatabase.mdb as MyZipfile.zip
Kill "MyOtherDatabase.mdb" 'this is the actual line of code

Does anyone have any ideas on why the Kill statement also deletes the zipfile,
MyZipfile.zip.

Thanks!

Steve
Nov 12 '05 #1
12 6401
That is not possible.

Most likely the zip failed, thus the file was never created in the first
place.
--
MichKa [MS]

This posting is provided "AS IS" with
no warranties, and confers no rights.
"Steve" <sa****@penn.com> wrote in message
news:ci******************@newsread1.news.atl.earth link.net...
AccessXP in Access2000 mode

I have the following code outline in a standard module in MyDatabase.mdb ---
Use CreateDatabase to create MyOtherDatabase.mdb
Use two make table queries to create two tables in MyOtherDatabase.mdb
Programatically zip MyOtherDatabase.mdb as MyZipfile.zip
Kill "MyOtherDatabase.mdb" 'this is the actual line of code

Does anyone have any ideas on why the Kill statement also deletes the zipfile, MyZipfile.zip.

Thanks!

Steve

Nov 12 '05 #2
Michka,

Thanks for responding!

When I comment out the Kill statement, MyOtherDatabase.mdb and MyZipfile.zip are
both there. If I run the code as shown in my post (with the Kill statement)
neither of these files are there.

Steve

"Michael (michka) Kaplan [MS]" <mi*****@online.microsoft.com> wrote in message
news:3f********@news.microsoft.com...
That is not possible.

Most likely the zip failed, thus the file was never created in the first
place.
--
MichKa [MS]

This posting is provided "AS IS" with
no warranties, and confers no rights.
"Steve" <sa****@penn.com> wrote in message
news:ci******************@newsread1.news.atl.earth link.net...
AccessXP in Access2000 mode

I have the following code outline in a standard module in

MyDatabase.mdb ---

Use CreateDatabase to create MyOtherDatabase.mdb
Use two make table queries to create two tables in MyOtherDatabase.mdb
Programatically zip MyOtherDatabase.mdb as MyZipfile.zip
Kill "MyOtherDatabase.mdb" 'this is the actual line of code

Does anyone have any ideas on why the Kill statement also deletes the

zipfile,
MyZipfile.zip.

Thanks!

Steve


Nov 12 '05 #3
NO idea if this will make a difference, but try giving the mdb and zip files
different names, e.g., temp.mdb and MyOtherDatabase.mdb. Does that change
anything?
"Steve" <sa****@penn.com> wrote in message
news:ci******************@newsread1.news.atl.earth link.net...
AccessXP in Access2000 mode

I have the following code outline in a standard module in MyDatabase.mdb ---
Use CreateDatabase to create MyOtherDatabase.mdb
Use two make table queries to create two tables in MyOtherDatabase.mdb
Programatically zip MyOtherDatabase.mdb as MyZipfile.zip
Kill "MyOtherDatabase.mdb" 'this is the actual line of code

Does anyone have any ideas on why the Kill statement also deletes the zipfile, MyZipfile.zip.

Thanks!

Steve

Nov 12 '05 #4
Bruce,

Thanks for responding!

Take a close look at my post, I already do this. The database file is named
MyOtherDatabase.mdb and when I zip it, I name the zip file, MyZipfile.zip. Then
in the Kill statement I explicitly name MyOtherDatabase.mdb to Kill.

Steve
"Bruce Rusk" <ho**********@spamless.ucla.edu> wrote in message
news:bk**********@gladiola.noc.ucla.edu...
NO idea if this will make a difference, but try giving the mdb and zip files
different names, e.g., temp.mdb and MyOtherDatabase.mdb. Does that change
anything?
"Steve" <sa****@penn.com> wrote in message
news:ci******************@newsread1.news.atl.earth link.net...
AccessXP in Access2000 mode

I have the following code outline in a standard module in

MyDatabase.mdb ---

Use CreateDatabase to create MyOtherDatabase.mdb
Use two make table queries to create two tables in MyOtherDatabase.mdb
Programatically zip MyOtherDatabase.mdb as MyZipfile.zip
Kill "MyOtherDatabase.mdb" 'this is the actual line of code

Does anyone have any ideas on why the Kill statement also deletes the

zipfile,
MyZipfile.zip.

Thanks!

Steve


Nov 12 '05 #5
The kill is Killing before the Create Zip has finished.

(david)

"Steve" <sa****@penn.com> wrote in message
news:GR******************@newsread1.news.atl.earth link.net...
Michka,

Thanks for responding!

When I comment out the Kill statement, MyOtherDatabase.mdb and MyZipfile.zip are both there. If I run the code as shown in my post (with the Kill statement) neither of these files are there.

Steve

"Michael (michka) Kaplan [MS]" <mi*****@online.microsoft.com> wrote in message news:3f********@news.microsoft.com...
That is not possible.

Most likely the zip failed, thus the file was never created in the first
place.
--
MichKa [MS]

This posting is provided "AS IS" with
no warranties, and confers no rights.
"Steve" <sa****@penn.com> wrote in message
news:ci******************@newsread1.news.atl.earth link.net...
AccessXP in Access2000 mode

I have the following code outline in a standard module in

MyDatabase.mdb ---

Use CreateDatabase to create MyOtherDatabase.mdb
Use two make table queries to create two tables in MyOtherDatabase.mdb
Programatically zip MyOtherDatabase.mdb as MyZipfile.zip
Kill "MyOtherDatabase.mdb" 'this is the actual line of code

Does anyone have any ideas on why the Kill statement also deletes the

zipfile,
MyZipfile.zip.

Thanks!

Steve



Nov 12 '05 #6
Hi,
Not sure how you're perfoming the zip, but if it's using Shell
and the zip command line tool, unless your using the ShellAndWait
code, that kill statement will execute immediately and presto no
more file to zip.

--
HTH
Dan Artuso, Access MVP
"Steve" <sa****@penn.com> wrote in message news:ci******************@newsread1.news.atl.earth link.net...
AccessXP in Access2000 mode

I have the following code outline in a standard module in MyDatabase.mdb ---

Use CreateDatabase to create MyOtherDatabase.mdb
Use two make table queries to create two tables in MyOtherDatabase.mdb
Programatically zip MyOtherDatabase.mdb as MyZipfile.zip
Kill "MyOtherDatabase.mdb" 'this is the actual line of code

Does anyone have any ideas on why the Kill statement also deletes the zipfile,
MyZipfile.zip.

Thanks!

Steve

Nov 12 '05 #7
David,

Thanks for responding!

That makes sense! Do you have any suggestions of what to add to the code to
overcome that problem?

Steve
"david epsom dot com dot au" <david@epsomdotcomdotau> wrote in message
news:OD**************@TK2MSFTNGP11.phx.gbl...
The kill is Killing before the Create Zip has finished.

(david)

"Steve" <sa****@penn.com> wrote in message
news:GR******************@newsread1.news.atl.earth link.net...
Michka,

Thanks for responding!

When I comment out the Kill statement, MyOtherDatabase.mdb and

MyZipfile.zip are
both there. If I run the code as shown in my post (with the Kill

statement)
neither of these files are there.

Steve

"Michael (michka) Kaplan [MS]" <mi*****@online.microsoft.com> wrote in

message
news:3f********@news.microsoft.com...
That is not possible.

Most likely the zip failed, thus the file was never created in the first
place.
--
MichKa [MS]

This posting is provided "AS IS" with
no warranties, and confers no rights.
"Steve" <sa****@penn.com> wrote in message
news:ci******************@newsread1.news.atl.earth link.net...
> AccessXP in Access2000 mode
>
> I have the following code outline in a standard module in
MyDatabase.mdb ---
>
> Use CreateDatabase to create MyOtherDatabase.mdb
> Use two make table queries to create two tables in MyOtherDatabase.mdb
> Programatically zip MyOtherDatabase.mdb as MyZipfile.zip
> Kill "MyOtherDatabase.mdb" 'this is the actual line of code
>
> Does anyone have any ideas on why the Kill statement also deletes the
zipfile,
> MyZipfile.zip.
>
> Thanks!
>
> Steve
>
>



Nov 12 '05 #8
Windoze works asychronously, so you start the process which makes a zip
file, but before zip geta around to actually creating and saving the zip
file, your next process comes in and deletes the .mdb which zip is supposed
to be working on....

You have to use a Wait for Process to end API call to ensure that the zip is
finished before doing the Kill.

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
"Steve" <sa****@penn.com> wrote in message
news:GR******************@newsread1.news.atl.earth link.net...
Michka,

Thanks for responding!

When I comment out the Kill statement, MyOtherDatabase.mdb and MyZipfile.zip are both there. If I run the code as shown in my post (with the Kill statement) neither of these files are there.

Steve

"Michael (michka) Kaplan [MS]" <mi*****@online.microsoft.com> wrote in message news:3f********@news.microsoft.com...
That is not possible.

Most likely the zip failed, thus the file was never created in the first
place.
--
MichKa [MS]

This posting is provided "AS IS" with
no warranties, and confers no rights.
"Steve" <sa****@penn.com> wrote in message
news:ci******************@newsread1.news.atl.earth link.net...
AccessXP in Access2000 mode

I have the following code outline in a standard module in

MyDatabase.mdb ---

Use CreateDatabase to create MyOtherDatabase.mdb
Use two make table queries to create two tables in MyOtherDatabase.mdb
Programatically zip MyOtherDatabase.mdb as MyZipfile.zip
Kill "MyOtherDatabase.mdb" 'this is the actual line of code

Does anyone have any ideas on why the Kill statement also deletes the

zipfile,
MyZipfile.zip.

Thanks!

Steve



Nov 12 '05 #9
Yes, I'm using Shell and the zip command line tool. I found the Shell and Wait
code at mvps.org/access website and will try that.

Thanks for the help, Dan!!
"Dan Artuso" <da*****@NoSpampagepearls.com> wrote in message
news:ud*************@TK2MSFTNGP11.phx.gbl...
Hi,
Not sure how you're perfoming the zip, but if it's using Shell
and the zip command line tool, unless your using the ShellAndWait
code, that kill statement will execute immediately and presto no
more file to zip.

--
HTH
Dan Artuso, Access MVP
"Steve" <sa****@penn.com> wrote in message

news:ci******************@newsread1.news.atl.earth link.net...
AccessXP in Access2000 mode

I have the following code outline in a standard module in MyDatabase.mdb ---

Use CreateDatabase to create MyOtherDatabase.mdb
Use two make table queries to create two tables in MyOtherDatabase.mdb
Programatically zip MyOtherDatabase.mdb as MyZipfile.zip
Kill "MyOtherDatabase.mdb" 'this is the actual line of code

Does anyone have any ideas on why the Kill statement also deletes the zipfile, MyZipfile.zip.

Thanks!

Steve




Nov 12 '05 #10

"Adrian Jansen" <qq*@noqqwhere.com> wrote in message
news:3f********@duster.adelaide.on.net...
Windoze works asychronously, so you start the process which makes a zip
file, but before zip geta around to actually creating and saving the zip
file, your next process comes in and deletes the .mdb which zip is supposed
to be working on....

You have to use a Wait for Process to end API call to ensure that the zip is
finished before doing the Kill.

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
"Steve" <sa****@penn.com> wrote in message
news:GR******************@newsread1.news.atl.earth link.net...
Michka,

Thanks for responding!

When I comment out the Kill statement, MyOtherDatabase.mdb and

MyZipfile.zip are
both there. If I run the code as shown in my post (with the Kill

statement)
neither of these files are there.

Steve

"Michael (michka) Kaplan [MS]" <mi*****@online.microsoft.com> wrote in

message
news:3f********@news.microsoft.com...
That is not possible.

Most likely the zip failed, thus the file was never created in the first
place.
--
MichKa [MS]

This posting is provided "AS IS" with
no warranties, and confers no rights.
"Steve" <sa****@penn.com> wrote in message
news:ci******************@newsread1.news.atl.earth link.net...
> AccessXP in Access2000 mode
>
> I have the following code outline in a standard module in
MyDatabase.mdb ---
>
> Use CreateDatabase to create MyOtherDatabase.mdb
> Use two make table queries to create two tables in MyOtherDatabase.mdb
> Programatically zip MyOtherDatabase.mdb as MyZipfile.zip
> Kill "MyOtherDatabase.mdb" 'this is the actual line of code
>
> Does anyone have any ideas on why the Kill statement also deletes the
zipfile,
> MyZipfile.zip.
>
> Thanks!
>
> Steve
>
>



Nov 12 '05 #11
Thanks for responding, Adrian!!

You're confirming what another poster said.

Steve
"Adrian Jansen" <qq*@noqqwhere.com> wrote in message
news:3f********@duster.adelaide.on.net...
Windoze works asychronously, so you start the process which makes a zip
file, but before zip geta around to actually creating and saving the zip
file, your next process comes in and deletes the .mdb which zip is supposed
to be working on....

You have to use a Wait for Process to end API call to ensure that the zip is
finished before doing the Kill.

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
"Steve" <sa****@penn.com> wrote in message
news:GR******************@newsread1.news.atl.earth link.net...
Michka,

Thanks for responding!

When I comment out the Kill statement, MyOtherDatabase.mdb and

MyZipfile.zip are
both there. If I run the code as shown in my post (with the Kill

statement)
neither of these files are there.

Steve

"Michael (michka) Kaplan [MS]" <mi*****@online.microsoft.com> wrote in

message
news:3f********@news.microsoft.com...
That is not possible.

Most likely the zip failed, thus the file was never created in the first
place.
--
MichKa [MS]

This posting is provided "AS IS" with
no warranties, and confers no rights.
"Steve" <sa****@penn.com> wrote in message
news:ci******************@newsread1.news.atl.earth link.net...
> AccessXP in Access2000 mode
>
> I have the following code outline in a standard module in
MyDatabase.mdb ---
>
> Use CreateDatabase to create MyOtherDatabase.mdb
> Use two make table queries to create two tables in MyOtherDatabase.mdb
> Programatically zip MyOtherDatabase.mdb as MyZipfile.zip
> Kill "MyOtherDatabase.mdb" 'this is the actual line of code
>
> Does anyone have any ideas on why the Kill statement also deletes the
zipfile,
> MyZipfile.zip.
>
> Thanks!
>
> Steve
>
>



Nov 12 '05 #12
You will have to look at the code for creating the zip:
Programatically zip MyOtherDatabase.mdb as MyZipfile.zip
(david)

"Steve" <sa****@penn.com> wrote in message
news:CS******************@newsread1.news.atl.earth link.net... David,

Thanks for responding!

That makes sense! Do you have any suggestions of what to add to the code to overcome that problem?

Steve
"david epsom dot com dot au" <david@epsomdotcomdotau> wrote in message
news:OD**************@TK2MSFTNGP11.phx.gbl...
The kill is Killing before the Create Zip has finished.

(david)

"Steve" <sa****@penn.com> wrote in message
news:GR******************@newsread1.news.atl.earth link.net...
Michka,

Thanks for responding!

When I comment out the Kill statement, MyOtherDatabase.mdb and

MyZipfile.zip are
both there. If I run the code as shown in my post (with the Kill

statement)
neither of these files are there.

Steve

"Michael (michka) Kaplan [MS]" <mi*****@online.microsoft.com> wrote in

message
news:3f********@news.microsoft.com...
> That is not possible.
>
> Most likely the zip failed, thus the file was never created in the first > place.
>
>
> --
> MichKa [MS]
>
> This posting is provided "AS IS" with
> no warranties, and confers no rights.
>
>
> "Steve" <sa****@penn.com> wrote in message
> news:ci******************@newsread1.news.atl.earth link.net...
> > AccessXP in Access2000 mode
> >
> > I have the following code outline in a standard module in
> MyDatabase.mdb ---
> >
> > Use CreateDatabase to create MyOtherDatabase.mdb
> > Use two make table queries to create two tables in MyOtherDatabase.mdb > > Programatically zip MyOtherDatabase.mdb as MyZipfile.zip
> > Kill "MyOtherDatabase.mdb" 'this is the actual line of code
> >
> > Does anyone have any ideas on why the Kill statement also deletes the > zipfile,
> > MyZipfile.zip.
> >
> > Thanks!
> >
> > Steve
> >
> >
>
>



Nov 12 '05 #13

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

Similar topics

6
by: Bob Swerdlow | last post by:
My application starts up a number of processes for various purposes using: self.popen = popen2.Popen3("/usr/local/bin/python -O "myscript.py") and then shuts them down when appropriate with...
10
by: Fred | last post by:
There is a setting in INIT.ORA that has the unintended side-effect of making sure the ALTER SYSTEM KILL SESSION command has immediate affect. Without this setting, I've seen some instances where...
2
by: Brett | last post by:
This statement mentions that complexity kills but can it be avoided? "The kind of scalability I'm talking about is styem scale and compliexity. Anyone who has written large scale systems knows...
6
by: RickDee | last post by:
Understand that when I start a thread, a number will be generated and is able to get from GetHashCode method. But I would like to use this number when I want to kill certain thread, anybody know...
0
by: __Beat__ | last post by:
Ho to kill a page? When calling my .NET 2.0 DLL from a page, I pass a reference to the page in the NEW: MyDLL = new MyClass(Page,Context) New Sets a global Variable that is then referenced in...
4
by: Richard Rossel | last post by:
Hi Fellows, I have a problem with process termination. I have a python code that apache runs through a django interface. The code is very simple, first, it creates a process with the...
18
by: =?Utf-8?B?VGhlU2lsdmVySGFtbWVy?= | last post by:
Because C# has no native SSH class, I am using SharpSSH. Sometimes, for reasons I do not know, a Connect call will totally lock up the thread and never return. I am sure it has something to do...
3
by: spectrumdt | last post by:
Hello. I am running Fedora Linux and KDE, using the Konsole command line. When coding Python, I regularly make a bug causing my program to not terminate. But how do I kill the non-terminating...
2
by: Dean Slindee | last post by:
Using this statement to utilize the spell checker in WinWord: WinOffice.clsWord.SpellChecker(txtNote.Text) 'this does not work because no main window is displayed 'Dim proc =...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
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...
0
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...
0
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...

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.