MagicAardvark
Member
- Joined
- Sep 10, 2010
- Messages
- 11
- Programming Experience
- Beginner
I currently have an application that links to an access database. The problem is I wt to run it from a cd or flash drive and the directory cannot find the file on other machines due to the spacific URL.
My code looks like
However this code looks specifically through the C drive when I build a .exe file.
Ive never published a program before so I am very new to this.
My code looks like
cnData.ConnectionString = " Provider=Microsoft.ACE.OLEDB.12.0;Data Source=../Data/PhoneBook.accdb;Persist Security Info=False;"
strSQL = " SELECT [LastName]+', '+[FirstName]+' '+[MiddleName] AS FullName, TblContact.* FROM TblContact ORDER BY [LastName]+', '+[FirstName]+' '+[MiddleName];"
daClient.SelectCommand = New OleDbCommand(strSQL, cnData)
daClient.Fill(dsClient, "TblContact")
Me.dtClient = dsClient.Tables("TblContact")
However this code looks specifically through the C drive when I build a .exe file.
Ive never published a program before so I am very new to this.