I have the following code:
Option Strict Off
Option Explicit On
Friend Class clsMain
Public Function OpenConnect() As ADODB.Connection
Dim com As Object
com = New ADODB.Command
Dim dbPath As String
'dbPath = VB6.GetPath & "\" & "ss.mdb"
dbPath = "My Documents" & "\" & "DotNet" & "\" & "ss" & "\" & "bin" & "\" & "ss.mdb"
cnConnection = New ADODB.Connection
cnConnection = New ADODB.Connection
With cnConnection
.Open("Provider=Microsoft.Jet.OLEDB.4.0; Data source ='" & dbPath & "'; Jet OLEDB:database password=123")
End With
End Function
End Class
________________________________________________
Now when I run this program it gives me the following error:
It looks if my path is correct
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in ss.exe
Additional information: 'C:\My Documents\DotNet\ss\bin\My Documents\DotNet\ss\bin\ss.mdb' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.

Path
Vidottom
plus in vb.net try this
dbpath = Application.StartupPath & "\ss.mdb"
Andres_Ghelarducci
Joanne A.
Guy Mahieu
-andy moyer
Youssef Abou-Kewik
I'm not sure why you're doing all the concatenation. What you're doing always evaluates to "My Documents\DotNet\ss\bin\ss.mdb", so why not just put "My Documents\DotNet\ss\bin\ss.mdb" Also, using the System.IO.Path class to manipuate path strings can be helpful.
One last thing, which is admittedly only an opinion. Option Strict off is roughly equivilent to AllowSubtleBugs = True