It's easy to change the location/name of a dataset using the project properties - but how can you change it during run time
The property shows Data Source=|DataDirectory|\filename, but there is no apparent way to access 'DataDirectory' in the code.
Any ideas

DataDirectory for Connection String
Chernomor
ydt
hi,
the table adapter has connection property you can use it
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'//edit the connection string fron user entery then reconnect again Dim conStr = "C:\Documents and Settings\Haitham\Desktop\dateTesting.mdb" Me.DateTTableAdapter.Connection.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & conStr
DateTestingDataSet.Clear()
Me.DateTTableAdapter.Fill(Me.DateTestingDataSet.dateT)
End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load '//this is the original settings Me.DateTTableAdapter.Fill(Me.DateTestingDataSet.dateT)
End Sub
End Class
hope this helps
Michael Thorn
Worked like a charm! Exactly what I was looking for.
Thanks.
!=MaYHeM