Пример #1
0
        private void ReadOffResultSet()
        {
            Driver driver = connection.InternalConnection.Driver;

            // first read off the schema
            Packet packet = driver.ReadPacket();

            while (!packet.IsLastPacket())
            {
                packet = driver.ReadPacket();
            }

            // now read off the data
            packet = driver.ReadPacket();
            while (!packet.IsLastPacket())
            {
                packet = driver.ReadPacket();
            }
        }
Пример #2
0
 public bool ReadDataRow()
 {
     packet = driver.ReadPacket();
     if (packet.IsLastPacket())
     {
         readRows = true;
         return(false);
     }
     fieldsRead  = 0;
     fieldLength = 0;
     NextField();
     return(true);
 }
Пример #3
0
        /// <summary>
        /// Checks to see if there are any row packets coming
        /// </summary>
        /// <returns>True if there are row packets available, false if not</returns>
        public bool CheckForRows()
        {
            // first read off any unread field defs
            while (fieldsRead < fieldCount)
            {
                GetField();
            }

            // read off the end of schema packet
            packet = driver.ReadPacket();
            if (!packet.IsLastPacket())
            {
                throw new MySqlException("Expected end of schema packet");
            }
            readSchema = true;

            packet = driver.PeekPacket();
            return(!packet.IsLastPacket());
        }
		/// <summary>
		/// Checks to see if there are any row packets coming
		/// </summary>
		/// <returns>True if there are row packets available, false if not</returns>
		public bool CheckForRows()
		{
			// first read off any unread field defs
			while (fieldsRead < fieldCount)
				GetField();

			// read off the end of schema packet
			packet = driver.ReadPacket();
			if ( ! packet.IsLastPacket())
				throw new MySqlException("Expected end of schema packet");
			readSchema = true;

			packet = driver.PeekPacket();
			return ! packet.IsLastPacket();
		}
		public bool ReadDataRow()
		{
			packet = driver.ReadPacket();
			if (packet.IsLastPacket())
			{
				readRows = true;
				return false;
			}
			fieldsRead = 0;
			fieldLength = 0;
			NextField();
			return true;
		}