Opening a dBase file : file not found but it exists really 
Author Message
 Opening a dBase file : file not found but it exists really

The program below doesnt go. I get this message :  = "Run time error 3044.
'c:\annu.dbf' isn't a valid path. Make
sure that the file exists...." and the file really exists. Same thing with
"annu" instead of "annu.dbf"

This same file can be opend with a Data control. In this case, I must select
"Record source" with "annu"  (name of the .dbf file). If record source is
not given, I get a message quite like with my application.

Thanks for your answers.

Source of the application :

Dim Db As Database
Dim Rs As Recordset

Private Sub Form_Load()
    Dim sn As Recordset
    Set Db = OpenDatabase("c:\annu.dbf", False, False, "dBase IV;")
    ......
    End Sub



Wed, 25 Jul 2001 03:00:00 GMT  
 Opening a dBase file : file not found but it exists really
Hi,

IIRC to open a dbase database you enter the directory in which the .dbf
file(s) reside.  The "database" will consist of all the .dbf files in that
directory.  Thus I think you should use:

    set Db = OpenDatabase("c:", False,False, "dBase IV;")

HTH

Peter

Quote:

>The program below doesnt go. I get this message :  = "Run time error 3044.
>'c:\annu.dbf' isn't a valid path. Make
>sure that the file exists...." and the file really exists. Same thing with
>"annu" instead of "annu.dbf"

>This same file can be opend with a Data control. In this case, I must
select
>"Record source" with "annu"  (name of the .dbf file). If record source is
>not given, I get a message quite like with my application.

>Thanks for your answers.

>Source of the application :

>Dim Db As Database
>Dim Rs As Recordset

>Private Sub Form_Load()
>    Dim sn As Recordset
>    Set Db = OpenDatabase("c:\annu.dbf", False, False, "dBase IV;")
>    ......
>    End Sub



Thu, 26 Jul 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Calling a DLL gives "File Not Found", but File Exists

2. File not Found / File already open

3. SOS:File Not Found (but it exists)

4. files exists or not - says that it doesn't exist

5. File existing or not existing?

6. Help File - Opens on Find tab not Contents tab

7. Accessing existing dBase 5.0 Index files(mdx)

8. Adding fields to an existing dBase file in vb6

9. File not Found Error - DLL File

10. File not found using an external DLL file

11. File Not found when file is there

12. Open File Dialog not showing Files

 

 
Powered by phpBB® Forum Software