Trying to close FoxPro files opened with ADO 
Author Message
 Trying to close FoxPro files opened with ADO

Hi,

I am writing a program in VB where I have to open two FoxPro files
(*.dbf and *.fpt), update them and then send them as an attachment via
email. The *.dbf one I use the statement SET EXCLUSIVE ON, and then,
after deleting some data, I ask it to PACK. Then, I insert some data in
it. The *.fpt one I only copy data to another db (but this one is MSSQL)
and then, delete what is inside it.

My problem is that I am not being able to "close" those files. In fact,
when I process the routine that picks up those files and attach them to
the email, I receive an error message that says "Failed to open/create
the file". I did some tests, as trying to open them using the statement
Open, and also to copy them using FileCopy, but the error message I
receive is "Access denied" (so, it means those files remain opened, no
matter if I close and then set the ADO connection as nothing.)

Does someone have an idea of what can it be? How can I close those files
(or unload them, or destroy their instances.. boh?)?

Thanks,

BellaG.

*** Sent via Developersdex http://www.*-*-*.com/ ***
Don't just participate in USENET...get rewarded for it!



Tue, 07 Sep 2004 23:04:24 GMT  
 Trying to close FoxPro files opened with ADO
How do you Pack DBF File through VB ?


Best Regards,

Luqman


Quote:

> Hi,

> I am writing a program in VB where I have to open two FoxPro files
> (*.dbf and *.fpt), update them and then send them as an attachment via
> email. The *.dbf one I use the statement SET EXCLUSIVE ON, and then,
> after deleting some data, I ask it to PACK. Then, I insert some data in
> it. The *.fpt one I only copy data to another db (but this one is MSSQL)
> and then, delete what is inside it.

> My problem is that I am not being able to "close" those files. In fact,
> when I process the routine that picks up those files and attach them to
> the email, I receive an error message that says "Failed to open/create
> the file". I did some tests, as trying to open them using the statement
> Open, and also to copy them using FileCopy, but the error message I
> receive is "Access denied" (so, it means those files remain opened, no
> matter if I close and then set the ADO connection as nothing.)

> Does someone have an idea of what can it be? How can I close those files
> (or unload them, or destroy their instances.. boh?)?

> Thanks,

> BellaG.

> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



Sun, 12 Sep 2004 05:27:47 GMT  
 Trying to close FoxPro files opened with ADO
I am not sure what your trouble might be, so I can only ask you the obvious.
If you are binding the recordsets to any controls, are you setting the
control.datsource to nothing? Are you closing the recordset, and the
connection objects, then setting them both to nothing? Hope you find your
solution.

Bruce H


Quote:

> Hi,

> I am writing a program in VB where I have to open two FoxPro files
> (*.dbf and *.fpt), update them and then send them as an attachment via
> email. The *.dbf one I use the statement SET EXCLUSIVE ON, and then,
> after deleting some data, I ask it to PACK. Then, I insert some data in
> it. The *.fpt one I only copy data to another db (but this one is MSSQL)
> and then, delete what is inside it.

> My problem is that I am not being able to "close" those files. In fact,
> when I process the routine that picks up those files and attach them to
> the email, I receive an error message that says "Failed to open/create
> the file". I did some tests, as trying to open them using the statement
> Open, and also to copy them using FileCopy, but the error message I
> receive is "Access denied" (so, it means those files remain opened, no
> matter if I close and then set the ADO connection as nothing.)

> Does someone have an idea of what can it be? How can I close those files
> (or unload them, or destroy their instances.. boh?)?

> Thanks,

> BellaG.

> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



Sat, 02 Oct 2004 00:59:12 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. GPF when trying to open a foxpro database

2. Trying to open FoxPro DBC

3. Does ADO Connection.Close ,Closes all open Recordsets

4. Beginner trying to read Visual Foxpro Database with CDX index and Fpt file

5. Use Ado to open Foxpro 3.0 Dbf Table!!!

6. Open Foxpro dbc/dbf with ADO

7. how to open a access/foxpro data files

8. Problen opening FoxPro files ???

9. How2 open foxpro .IDX file

10. Open a FoxPro DAT file?

11. ADO open and close methods

12. ADO Database connection open or closed?

 

 
Powered by phpBB® Forum Software