D
Dinko Deranja
My question is simple, but I haven't found an answer:
How to connect to Access database that will always be in the application
root directory (in VS IDE)?
I am making a windows forms application, and I dragged the OleDbConnection
to the form. If I change the conn string (in "WinForm designer generated
code") to ... & Application.StartupPath & "/mydb.mdb.." then whenever I
change something in the form, the above code is automatically replaced (and
hardcoded) with the current value of StartupPath. If I remove the path and
leave only "mydb.mdb" then the default dir is C:\.
How to connect to Access database that will always be in the application
root directory (in VS IDE)?
I am making a windows forms application, and I dragged the OleDbConnection
to the form. If I change the conn string (in "WinForm designer generated
code") to ... & Application.StartupPath & "/mydb.mdb.." then whenever I
change something in the form, the above code is automatically replaced (and
hardcoded) with the current value of StartupPath. If I remove the path and
leave only "mydb.mdb" then the default dir is C:\.