I have an app that uses an SQL Server Express 2008, .mdf file.
On my computer where i've coded the app all work's fine using this code:
On the clients computer i've installed the SQL Server Express 2008 and the application and i got this error:Code:If conexiune.State <> ConnectionState.Open Then Try conexiune.ConnectionString = "Data Source=.\SQLEXPRESS; AttachDbFilename=" & My.Settings.locatie_baza_date.ToString & "; Initial Catalog=" & My.Settings.locatie_baza_date.ToString & "; Integrated Security=True; Connect Timeout=30; User Instance=True;" conexiune.Open() Catch ex As Exception frm_afisare_eroare.lbl_cod_eroare.Text = Err.Number frm_afisare_eroare.txt_detalii_eroare.Text = ex.Message & vbCrLf & vbCrLf & ex.StackTrace & vbCrLf & vbCrLf & " (" & Err.Source & "-" & Err.LastDllError & "-" & Err.Erl & ")" frm_afisare_eroare.Show() End Try Else End If
ExecuteScalar requires an open avalaible Connection.
What's wrong in this code?




Reply With Quote