Im new to Visual Basic, and I tried a simple application using VB2008 and MS-Access. It is a simple application to store Employee ID, Employee Name and Employee Photo.
Both Employee ID and Name are of String type and Photo of OLE type in MS-Access database. I created the file employee.mdb and placed the file in MyProjects folder where my VB application is present.
My Code Works, only if the .mdb file is located in the same location where I choose my photo.
i.e., if I choose my employee photo in 'My Pictures' folder, then the code works only if employee.mdb is present in 'My Pictures' folder. Else it shows an error that it couldn't find employee.mdb
Dim cnString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=employee.mdb"
Even if I include the full path in the string, it shows the same error.
Please help me in solving the issue. . Thank u in advance. . I have attached the project code hereunder.
(P.S: I know it is a small issue. Im completely new to VB and so I couldn't get the solution. Kindly pardon me for stealing your valuable time.)
Number of downloads: 203