Nancy -
> I cannot get the translated code
> in VEE to kill the Access instance.
> What is missing??
You can try Delete Variable db and Delete Variable acc
(Data->Variable->Delete Variable) but whether or not that will work I don't
know. This would theoretically be the same as Set db = Nothing and Set acc =
Nothing but this is something Agilent has been working on (if memory serves,
there's a .02 patch that addresses this issue).
If nothing else, you can use one of the "Kill" utilities to make sure your
Access instance is getting nuked. Search for "Excel" and "Kill Excel" in the
archives of this mailing list - this comes up a lot
If you can't find that there's a kill util in the resource kit. Or download
one for NT (& variants) from here:
http://www.sysinternals.com/ntw2k/freeware/pskill.shtml
Alternatively, live with the fact that there will be an open instance of
Access and maybe change the code to use GetObject instead of CreateObject.
If Get fails, use Create.
-SHAWN-
---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@it.lists.it.agilent.com".
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".
> I cannot get the translated code
> in VEE to kill the Access instance.
> What is missing??
You can try Delete Variable db and Delete Variable acc
(Data->Variable->Delete Variable) but whether or not that will work I don't
know. This would theoretically be the same as Set db = Nothing and Set acc =
Nothing but this is something Agilent has been working on (if memory serves,
there's a .02 patch that addresses this issue).
If nothing else, you can use one of the "Kill" utilities to make sure your
Access instance is getting nuked. Search for "Excel" and "Kill Excel" in the
archives of this mailing list - this comes up a lot
If you can't find that there's a kill util in the resource kit. Or download
one for NT (& variants) from here:
http://www.sysinternals.com/ntw2k/freeware/pskill.shtml
Alternatively, live with the fact that there will be an open instance of
Access and maybe change the code to use GetObject instead of CreateObject.
If Get fails, use Create.
-SHAWN-
---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@it.lists.it.agilent.com".
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".
The following sample code was written to open an MSAccess file which is protected with a password, run the report in
the *.mdb file, and close the file and Access instance. This code works well in VB (actually VB under Access) but I cannot get
the translated code in VEE to kill the Access instance. What is missing??
thanks,
Nancy Moreyra
Test Engineer
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Here's the VB code:
Dim acc As Access.Application
Dim db As DAO.Database
Dim strDbName As String
strDbName = "C:datamsaccessdb2.mdb"
Set acc = New Access.Application
Set db = acc.DBEngine.OpenDatabase(strDbName, False, False, ";PWD=test")
acc.OpenCurrentDatabase strDbName
acc.DoCmd.OpenReport "Report1"
db.Close
Set db = Nothing
acc.Quit
Set acc = Nothing
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Here's the VEE pro code:
declare db as object of class Database from DAO Library
declare acc as object of class Application from Access Library
declare label_filen as text
label_filen = "C:datamsaccessdb2.mdb";
Set acc = createObject("Access.Application.8");
Set db = acc.DBEngine.OpenDatabase(label_filen,0,0,"MS Access;PWD="+A); \where 'A' is the password
acc.OpenCurrentDatabase(label_filen);
acc.DoCmd.OpenReport("Report1", acViewNormal);
db.Close();
acc.Quit();
---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@it.lists.it.agilent.com".
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".