문제

When transfering file to another location i always need to change the source or directory..

Dim cnn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\Renz\Desktop\FINAL\Database\AuditDB.mdb")

Is there a way I can avoid that?

도움이 되었습니까?

해결책

You could use a path relative to your applications location, e.g.

Dim cnn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Database\AuditDB.mdb")

Where in this example I am presuming that your database is stored in a folder called Database in the same folder as your program.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top