For example I have this query
MySQL_Query = "UPDATE `owner_info` " _
& "SET isArchived = 1 " _
& "WHERE id=@ownerID"
Dim MySQL_CMD As New MySqlCommand(MySQL_Query, MysqlConn)
Try
MySQL_CMD.Connection.Open()
MySQL_CMD.CommandText = MySQL_Query
MySQL_CMD.Parameters.Add(New MySqlParameter("@ownerID", ownerID))
MySQL_CMD.ExecuteNonQuery()
Catch myerror As MySqlException
Console.WriteLine("Error: Owner Info Delete")
Console.WriteLine(myerror)
Finally
MysqlConn.Close()
MysqlConn.Dispose()
End Try
If I use
console.writeline("Query: " & MySQL_Query")
It will output
UPDATE `owner_info` SET isArchived = 1 WHERE id=@ownerID
Is there a way that I can view what's inside the @ownerID?
Yeah I can do something like the below code, but it seems hassle?
console.writeline("Query: " & MySQL_Query" & "(" & ownerID & ")")
Is there any other way to do this? Maybe a more simple way.
cmd.Parameters("@ownerID").ValueIn that code, its always going to be the value ofownerId