Assalamu'alaikum, I have a problem with my syntax for user registration in my asp.net 4 website, it's say error Invalid column name 'count'. This is my syntax :Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If IsPostBack Then Dim koneksi As New SqlConnection(ConfigurationManager.ConnectionStrings("corefigh_anggotaConnectionString1").ConnectionString) koneksi.Open() Dim query As String = "select count from anggota where nama_pengguna='" + txtnama.Text + "'" Dim penggunaaktif As New SqlCommand(query, koneksi) Dim temp As Integer = Convert.ToInt32(penggunaaktif.ExecuteScalar.ToString) If temp = 1 Then Response.Write("Nama pengguna sudah ada") End If End If End Sub
And the error highlight is pointing at this line :Dim temp As Integer = Convert.ToInt32(penggunaaktif.ExecuteScalar.ToString)
www.anggalisdiyanto.net