Hello everyone. I get a "File Not Found" error when I execute my app at a client computer. My connection string is the following: " con.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" & Application.StartupPath & "\HorseRacing.mdb""

sql = "SELECT Results.id, Results.race_date, Results.finishing_position, Results.number_of_runners, Results.race_time, Results.meeting, Results.distance, Results.draw, Results.horse_name, Results.in_play_low, Results.going, Results.race_name " _
& "FROM Results " _
& "ORDER BY Results.distance;"
Try
con.Open()
Catch ex As OleDbException
MessageBox.Show(ex.ToString)
Return
End Try
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "Results")

' Set to details view
ListView1.Visible = True
ListView1.View = View.Details

ListView1.Columns.Add("ID", 60, HorizontalAlignment.Left)
ListView1.Columns.Add("Race Date", 75, HorizontalAlignment.Left)

It's saying "File Not Found" now after i caught the exception. But earlier i wasn't catching the exception and the runtime error was more specific about what was ailing it. It was the filepath/horseracing.mdb that it couldn't find. Basically it can't find the horseracing.mdb file. Or it doesn't recognize it. I'm going nuts on this.


Everything works fine on the development machine. In my first deployment attempt the database wasn't included in the application files. Then from this site i learned that if the database wasn't shown in solution explorer; that i should do a project/add existing item" and include the db as an existing item and set it's build action to content and that would add the db to the application files in deployment. And it did. It's there and marked "required".
I've noticed that on the client machine the exe is called somefile_exe_deploy and the db is called horseracing_mdb_deploy. If someone can help that would be great.