I thing the soluction with |DataDirectory| is good but it don't work for me.
I try this but is not work
string spoj = @"Data Source=|DataDirectory|\baza.sdf; Persist Security Info=False;";
SqlConnection konekcija = new SqlConnection(spoj);
konekcija.Open();
string upit="select * from osoba";
SqlDataAdapter da = new SqlDataAdapter(upit, konekcija);
DataSet ds = new DataSet();
da.Fill(ds, "osoba");
dataGridView1.DataSource = ds.Tables["osoba"];
If you can advice me i be grateful.
Dorababu MekaPosted Oct 4, 2012, 4:27 AM
Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True