ArTDsL
New member
- Joined
- Nov 17, 2014
- Messages
- 2
- Programming Experience
- 3-5
Sorry for my bad English because i'm Brazilian, and Hi! I'm New here and i need your guys Help!
Here is the code:
txt_NUsuario = New User
My.Settings.usuario_logado = User in in the system!
MySQL error: Says the line strsql = "update tab_usuario set usuario= '" & txt_NUsuario.Text & "' where usuario = '" & My.Settings.usuario_logado.ToString & "'", is wrong and i need check the manual for extra help!
Please Help!
Here is the code:
VB.NET:
Function ChangeUser() As String
objconn.ConnectionString = ("Server=xxx.xxx.xxx.xx;port=3306;Database=xxx;userid=xx;password=xxx")
Try
objconn.Open()
strsql = "update tab_usuario set usuario= '" & txt_NUsuario.Text & "' where usuario = '" & My.Settings.usuario_logado.ToString & "'"
objcmd = New MySqlCommand(strsql, objconn)
With objcmd
End With
objcmd.ExecuteNonQuery()
objconn.Close()
MsgBox("UserName Changed!", MsgBoxStyle.OkOnly, Title:="Ambu Video Server")
Catch ex As Exception
MsgBox(ex.Message)
'MsgBox("ERRO008" + vbCrLf + vbCrLf + "Fail", MsgBoxStyle.OkOnly, Title:="Ambu Video Server")
Finally
objconn.Dispose()
End Try
End Function
txt_NUsuario = New User
My.Settings.usuario_logado = User in in the system!
MySQL error: Says the line strsql = "update tab_usuario set usuario= '" & txt_NUsuario.Text & "' where usuario = '" & My.Settings.usuario_logado.ToString & "'", is wrong and i need check the manual for extra help!
Please Help!