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.




Reply With Quote