d2005
Active member
Cmon now take a wee look, update command
i want the textbox to display to the current user,
(who has logged in using username and password )
visual basic code: Dim cmdselect As SqlCommand cmdselect = New SqlCommand("SELECT msg_default from tb_comp_detail ", oSQLConn) txtDefault.Text = cmdselect.ExecuteScalar().ToString()
can i just put in an sql that says "select msg where current user"
DOES ANYONE HAVE ANY IDEAS
i.e. at the minute the txtbox displays the first row in the database
i want the textbox to display the information for the current user
__________________
also what the problem with this update
Line 1: Incorrect syntax near '('.
Line 81: Dim sqlSaveMsg1 As New SqlCommand("update tb_comp_detail (msg_custom1) Values ( txt_msg1.text );", oSQLConn)Line 82: oSQLConn.Open()Line 83: sqlSaveMsg1.ExecuteNonQuery()Line 84: oSQLConn.Close()
i want the textbox to display to the current user,
(who has logged in using username and password )
visual basic code: Dim cmdselect As SqlCommand cmdselect = New SqlCommand("SELECT msg_default from tb_comp_detail ", oSQLConn) txtDefault.Text = cmdselect.ExecuteScalar().ToString()
can i just put in an sql that says "select msg where current user"
DOES ANYONE HAVE ANY IDEAS
i.e. at the minute the txtbox displays the first row in the database
i want the textbox to display the information for the current user
__________________
also what the problem with this update
Line 1: Incorrect syntax near '('.
Line 81: Dim sqlSaveMsg1 As New SqlCommand("update tb_comp_detail (msg_custom1) Values ( txt_msg1.text );", oSQLConn)Line 82: oSQLConn.Open()Line 83: sqlSaveMsg1.ExecuteNonQuery()Line 84: oSQLConn.Close()
Last edited: