Results 1 to 6 of 6

Thread: Not a valid path ?

  1. #1

    Thread Starter
    Hyperactive Member Art W.'s Avatar
    Join Date
    Apr 2002
    Location
    In My Own Little World, But that’s OK because they know me there!
    Posts
    271

    Not a valid path ?

    Hello Everyone:

    When I run the follow code I keep getting an error message that reads “Not a valid path” See The Code Below”. I have copied the path from the browser and the file name from the properties dialog box. I checked it is a mdb file.

    What am I missing?

    Is there another way to check the path of the file?

    I am using VB 2005


    Dim conn As New OleDbConnection()
    conn.ConnectionString = "Provider=Microsoft.jet.oledb.4.0;Data Source=C:\Documents and Settings\Art\My Documents\Office\Access\MN\Seeds 1\Seeds 1.mdb;User ID=admin;Password=;"
    ' C:\Documents and Settings\Art\My Documents\Office\Access\MN\Seeds1
    ' Seeds 1
    Dim strSQL As String = "Select Results from Seeds1"
    Dim da As New OleDbDataAdapter(strSQL, conn)
    da.Fill(ds)
    If ds.Tables(0).Rows.Count > 0 Then 'check to see if the table is empty
    txtResults.Text = ds.Tables(0).Rows(0).Item("Results").ToString()

    End If





    Thanks

    Art W.
    SLEEP: A Totally Inadequate Substation For Caffeine!

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Not a valid path ?

    Does the folder structure exist on your PC?

    (C:\Documents and Settings\Art\My Documents\Office\Access\MN\Seeds 1\)

  3. #3

    Thread Starter
    Hyperactive Member Art W.'s Avatar
    Join Date
    Apr 2002
    Location
    In My Own Little World, But that’s OK because they know me there!
    Posts
    271

    Re: Not a valid path ?

    Hello:

    yes please see the comments in the code they are copied paths.

    Thanks

    Art W.
    SLEEP: A Totally Inadequate Substation For Caffeine!

  4. #4
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,763

    Re: Not a valid path ?

    In the comments you have "Seeds1" in the code you have "Seeds 1"
    Check your path again.
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  5. #5

    Thread Starter
    Hyperactive Member Art W.'s Avatar
    Join Date
    Apr 2002
    Location
    In My Own Little World, But that’s OK because they know me there!
    Posts
    271

    Re: Not a valid path ?

    Hello Everyone:

    I have tried both with and without spaces. all combatinations.

    Thanks

    Art
    SLEEP: A Totally Inadequate Substation For Caffeine!

  6. #6
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,763

    Re: Not a valid path ?

    "Select Results from Seeds1"

    Seeds1 is a: 1)database? 2)datatable?
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width