public void ExecuteStatement(MySqlPacket packetToExecute) { warnings = 0; packetToExecute.SetByte(4, (byte)DBCmd.EXECUTE); ExecutePacket(packetToExecute); serverStatus |= ServerStatusFlags.AnotherQuery; }
/// <summary> /// Query is the method that is called to send all queries to the server /// </summary> public void SendQuery(MySqlPacket queryPacket) { warnings = 0; queryPacket.SetByte(4, (byte)DBCmd.QUERY); ExecutePacket(queryPacket); // the server will respond in one of several ways with the first byte indicating // the type of response. // 0 == ok packet. This indicates non-select queries // 0xff == error packet. This is handled in stream.OpenPacket // > 0 = number of columns in select query // We don't actually read the result here since a single query can generate // multiple resultsets and we don't want to duplicate code. See ReadResult // Instead we set our internal server status flag to indicate that we have a query waiting. // This flag will be maintained by ReadResult serverStatus |= ServerStatusFlags.AnotherQuery; }