当前位置: 首页>>代码示例>>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;未经允许,请勿转载。