當前位置: 首頁>>代碼示例>>C#>>正文


C# MySqlPacket.SetByte方法代碼示例

本文整理匯總了C#中MySql.Data.MySqlClient.MySqlPacket.SetByte方法的典型用法代碼示例。如果您正苦於以下問題:C# MySqlPacket.SetByte方法的具體用法?C# MySqlPacket.SetByte怎麽用?C# MySqlPacket.SetByte使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在MySql.Data.MySqlClient.MySqlPacket的用法示例。


在下文中一共展示了MySqlPacket.SetByte方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: SendQuery

 /// <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;
 }
開發者ID:NiDragon,項目名稱:IllTechLibrary,代碼行數:19,代碼來源:NativeDriver.cs

示例2: ExecuteStatement

 public void ExecuteStatement(MySqlPacket packetToExecute)
 {
     warnings = 0;
       packetToExecute.SetByte(4, (byte)DBCmd.EXECUTE);
       ExecutePacket(packetToExecute);
       serverStatus |= ServerStatusFlags.AnotherQuery;
 }
開發者ID:NiDragon,項目名稱:IllTechLibrary,代碼行數:7,代碼來源:NativeDriver.cs


注:本文中的MySql.Data.MySqlClient.MySqlPacket.SetByte方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。