Ejemplo n.º 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;
            }
        }
Ejemplo n.º 2
0
        internal void RequestPrepare(string sql, PrepareOption flag)
        {
            WriteCommand(FunctionCode.Prepare);
            WriteStringArg(sql, Encoding.Default);
            WriteByteArg((byte)flag);

            Flush();
            Receive();
        }
Ejemplo n.º 3
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;
            }
        }
 /// <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));
 }
 /// <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));
 }
Ejemplo n.º 6
0
        internal void RequestPrepare(string sql, PrepareOption flag)
        {
            WriteCommand(FunctionCode.Prepare);
            WriteStringArg(sql, Encoding.Default);
            WriteByteArg((byte)flag);

            Flush();
            Receive();
        }