コード例 #1
0
        internal void PrepareInternal(string sql, PrepareOption flag)
        {
            con.ReconnectIfNeed();

            CubridStream stream = con.Stream;

            stream.RequestPrepare(sql, flag);

            handle = stream.ResponseCode;
            resultCacheLifetime = stream.ReadInt();
            statementType       = (CubridStatementype)stream.ReadByte();
            bindCount           = stream.ReadInt();
            isUpdateable        = (stream.ReadByte() == 1);
            columnCount         = stream.ReadInt();

            Debug.WriteLine("handle = " + handle);
            Debug.WriteLine("resultCacheLifetime = " + resultCacheLifetime);
            Debug.WriteLine("statementType = " + statementType);
            Debug.WriteLine("bindCount = " + bindCount);
            Debug.WriteLine("isUpdateable = " + isUpdateable);
            Debug.WriteLine("columnCount = " + columnCount);

            columnInfos = stream.ReadColumnInfo(columnCount);

            if (bindCount > 0)
            {
                parameters = new CubridParameter[bindCount];
            }

            if (statementType == CubridStatementype.CallStoredProcedure)
            {
                columnCount = bindCount + 1;
            }
        }
コード例 #2
0
        internal void RequestPrepare(string sql, PrepareOption flag)
        {
            WriteCommand(FunctionCode.Prepare);
            WriteStringArg(sql, Encoding.Default);
            WriteByteArg((byte)flag);

            Flush();
            Receive();
        }
コード例 #3
0
ファイル: CubridCommand.cs プロジェクト: dong1/testsize
        internal void PrepareInternal(string sql, PrepareOption flag)
        {
            con.ReconnectIfNeed();

            CubridStream stream = con.Stream;

            stream.RequestPrepare(sql, flag);

            handle = stream.ResponseCode;
            resultCacheLifetime = stream.ReadInt();
            statementType = (CubridStatementype)stream.ReadByte();
            bindCount = stream.ReadInt();
            isUpdateable = (stream.ReadByte() == 1);
            columnCount = stream.ReadInt();

            Debug.WriteLine("handle = " + handle);
            Debug.WriteLine("resultCacheLifetime = " + resultCacheLifetime);
            Debug.WriteLine("statementType = " + statementType);
            Debug.WriteLine("bindCount = " + bindCount);
            Debug.WriteLine("isUpdateable = " + isUpdateable);
            Debug.WriteLine("columnCount = " + columnCount);

            columnInfos = stream.ReadColumnInfo(columnCount);

            if (bindCount > 0)
            {
                parameters = new CubridParameter[bindCount];
            }

            if (statementType == CubridStatementype.CallStoredProcedure)
            {
                columnCount = bindCount + 1;
            }
        }
コード例 #4
0
 /// <summary>
 /// Called by all functions that require PrepareTape()
 /// </summary>
 /// <param name="option">PrepareType option</param>
 /// <param name="immediate">If true, return immediately.
 /// If false, return after operation has finished</param>
 private void Prepare(PrepareOption option, bool immediate)
 {
     CheckError(TapeDriveFunctions.PrepareTape(tapeHandle, (UInt32)option, immediate));
 }
コード例 #5
0
 /// <summary>
 /// Called by all functions that require PrepareTape()
 /// </summary>
 /// <param name="option">PrepareType option</param>
 /// <param name="immediate">If true, return immediately.
 /// If false, return after operation has finished</param>
 private void Prepare(PrepareOption option, bool immediate)
 {
     CheckError(TapeDriveFunctions.PrepareTape(tapeHandle, (UInt32)option, immediate));
 }
コード例 #6
0
ファイル: CubridStream.cs プロジェクト: dong1/testsize
        internal void RequestPrepare(string sql, PrepareOption flag)
        {
            WriteCommand(FunctionCode.Prepare);
            WriteStringArg(sql, Encoding.Default);
            WriteByteArg((byte)flag);

            Flush();
            Receive();
        }