I try to open connection on this way but when I start program show me error :The database file cannot be found. Check the path to the database. [ File name = .\pocket.sdf ]Code:cnProdaja = New Data.SqlServerCe.SqlCeConnection("Data Source =.\pocket.sdf;") Dim rsProdaja As System.Data.SqlServerCe.SqlCeDataReader cnProdaja.Open() Dim naredba As New System.Data.SqlServerCe.SqlCeCommand("select sifra, naziv_skladista From skladiste", cnProdaja) rsProdaja = naredba.ExecuteReader While rsProdaja.Read Me.ComboBox1.Items.Add(rsProdaja("naziv_skladista"))
My connection string is ok,I really dont know why project don't work!




Reply With Quote