"Invalid Path" when opening database 
Author Message
 "Invalid Path" when opening database

OK, I know I have been asking a lot of questions about this, but I
figure that I haven't been getting any answers because I haven't been
giving out enough info.

When I use a common dialog to allow the user to select a database file
(in this case a tab-delimited text file), and then try to open the
Database, I get an "Invalid Path" error.

Code looks like this:

        CommonDialog1.Action = 1
        DataFile = CommonDialog1.filename

        'Open external text data file.
        Set CurrentDatabase = OpenDatabase(DataFile, False, False, _                    "Text;")

I get the error in the last line.  A dialog box appears that gives
run-time error 3044, and the correct path and file name in single
quotes, followed by "isn't a valid path."

This is all in VB4.0 32 bit on Win95.

Anybody got any ideas? Please?
Randy Hawley  | All opinions expressed|           John 3:16
Eli Lilly & Co| are mine, not theirs  |I'm not perfect, just Forgiven !

        Visit my home page: http://www.*-*-*.com/ ~rhawley/
                        COGITO ERGO CONFUNDI

Sat, 16 Oct 1999 03:00:00 GMT  
 "Invalid Path" when opening database

On Tue, 29 Apr 1997 08:42:35 -0500, "Randall R. Hawley"


>    CommonDialog1.Action = 1
>    DataFile = CommonDialog1.filename

>    'Open external text data file.
>    Set CurrentDatabase = OpenDatabase(DataFile, False, False, _                    "Text;")

The error message says that Datafile isn't a valid path so first check
this. How? Simple just use debug (or a messagebox) to find out the
value of DataFile.

CommonDialog1.Action = 1
DataFile = CommonDialog1.filename
Msgbox DataFile

'Open external text data file.
Set CurrentDatabase = OpenDatabase(DataFile, False, False, "Text;")

gr. walther

----- it's the line -----
Walther Musch; Tilburg University

Mon, 18 Oct 1999 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. SysCmd 603, "path","path"

2. VB5 Database, "Not a valid path"

3. App.Path returns "short" path name

4. Crystal Reports "Unable to open database"

5. Crystal Report "unable to open database"

6. "Open/Open With..." from Win Explorer


8. Need help with "Invalid Argument"

9. "Invalid use of null" error

10. "Operation invalid without current index"

11. "Invalid Argument" Error Message

12. Error msg "Invalid Field Data "


Powered by phpBB® Forum Software