I have the following MySqlCommand:
Dim cmd As New MySqlCommand
cmd.CommandText = "REPLACE INTO `customer` VALUES( ?customerID, ?firstName, ?lastName)"
With cmd.Parameters
.AddWithValue("?customerID", m_CustomerID)
.AddWithValue("?firstName", m_FirstName)
.AddWithValue("?lastName", m_LastName)
End With
I have a class that handles the execution of MySqlCommands, and I would like it to log every request in a file. I can get the request / command executed with:
cmd.CommandText
but this just returns the original CommandText with parameters (? customerID,? firstName, etc.), and not the actual substituted values โโadded by the AddWithValue functions . How can I find out the actual "final" request that was executed?
source
share