Hey I have a problem with execute query into sql I got an error I want to add query like sql into sql can I put query by click on new query then i execute it I need to make the same idea but without open sql I need to execute it by program by add the query into textbox called query.text then execute it

Image link error code..

You're going to step too far with this line:
command = New SqlCommand(Query.Text, mysqlconn).ExecuteNonQuery

Instead of setting up your command object and storing it in the command variable you are trying to place the result of exectuting the command there.
Which can't be done of course, it's the wrong type.


command = New SqlCommand(Query.Text, mysqlconn)
Integer result = command.ExecuteNonQuery