Tag Archives: DELETE

Refresh TreeView after insert/update/delete ?

Wrong solution : DataBind() BEFORE close()         TreeView1.DataBind()         con.Close() Right solution: In btnListtAdd_Click :   To get the ID         Dim lastID As String = “Select @@Identity”         Dim getID As Integer         ‘this is to get last ID … Continue reading

Posted in Databases, Programming, SQL-Server, VB.NET | Tagged , , , , , | Leave a comment

ExecuteReader vs ExecuteNonQuery vs ExecuteScalar

ExecuteReader() For SELECT statement ExecuteNonQuery() For INSERT , UPDATE and DELETE Not for SELECT statement. ExecuteScalar() For images   Ahmed.

Posted in Comparison, Databases, Programming, SQL-Server, VB.NET | Tagged , , , , , , , , , | Leave a comment