Example #1
0
        internal BatchResult[] ReadBatchResult(int count)
        {
            BatchResult[] results = new BatchResult[count];

            for (int i = 0; i < count; i++)
            {
                results[i].StmtType = (StmtType)ReadByte(); //statement type
                results[i].Result   = ReadInt();            //execute result

                if (results[i].Result < 0)
                {
                    results[i].ErrorCode    = results[i].Result;
                    results[i].Result       = -3; //???
                    results[i].ErrorMessage = ReadString(ReadInt(), Encoding.Default);
                }
                else
                {
                    ReadInt();   //dummy
                    ReadShort(); //dummy
                    ReadShort(); //dummy
                }
            }

            return(results);
        }
Example #2
0
        internal BatchResult[] ReadBatchResult(int count)
        {
            BatchResult[] results = new BatchResult[count];

            for (int i = 0; i < count; i++)
            {
                results[i].StmtType = (StmtType) ReadByte(); //statement type
                results[i].Result = ReadInt(); //execute result

                if (results[i].Result < 0)
                {
                    results[i].ErrorCode = results[i].Result;
                    results[i].Result = -3; //???
                    results[i].ErrorMessage = ReadString(ReadInt(), Encoding.Default);
                }
                else
                {
                    ReadInt(); //dummy
                    ReadShort();//dummy
                    ReadShort();//dummy
                }
            }

            return results;
        }