Exemplo n.º 1
0
        public OciParameterDescriptor GetParameter(int position)
        {
            IntPtr handle = IntPtr.Zero;
            int    status = 0;

            status = OciCalls.OCIParamGet(this,
                                          OciHandleType.Statement,
                                          ErrorHandle,
                                          out handle,
                                          position + 1);

            if (status != 0)
            {
                OciErrorInfo info = ErrorHandle.HandleError();
                throw new OracleException(info.ErrorCode, info.ErrorMessage);
            }

            OciParameterDescriptor output = new OciParameterDescriptor(this, handle);

            output.ErrorHandle = ErrorHandle;
            if (parm == null)
            {
                parm = new ArrayList();
            }
            parm.Add(handle);
            return(output);
        }
Exemplo n.º 2
0
        internal void DefineByPosition(int position, OracleConnection connection)
        {
            OciParameterDescriptor parameter = ((OciStatementHandle)Parent).GetParameter(position);

            //name = parameter.GetName ();
            definedType = parameter.GetDataType();
            definedSize = parameter.GetDataSize();
            //precision = parameter.GetPrecision ();
            scale = parameter.GetScale();

            Define(position, connection);

            parameter.Dispose();
        }
Exemplo n.º 3
0
        internal void DefineByPosition(int position, OracleConnection connection)
        {
            OciParameterDescriptor parameter = ((OciStatementHandle)Parent).GetParameter(position);

            name        = parameter.GetName();
            definedType = parameter.GetDataType();
            definedSize = parameter.GetDataSize();
            //precision = parameter.GetPrecision ();
            scale     = parameter.GetScale();
            rlenp     = OciCalls.AllocateClear(sizeof(short));
            indicator = OciCalls.AllocateClear(sizeof(short));

            Define(position, connection);

            parameter.Dispose();
        }
Exemplo n.º 4
0
		public OciParameterDescriptor GetParameter (int position)
		{
			IntPtr handle = IntPtr.Zero;
			int status = 0;

			status = OciCalls.OCIParamGet (this,
						OciHandleType.Statement,
						ErrorHandle,
						out handle,
						position + 1);

			if (status != 0) {
				OciErrorInfo info = ErrorHandle.HandleError ();
				throw new OracleException (info.ErrorCode, info.ErrorMessage);
			}

			OciParameterDescriptor output = new OciParameterDescriptor (this, handle);
			output.ErrorHandle = ErrorHandle;
			if (parm == null)
				parm = new ArrayList();
			parm.Add(handle);
			return output;
		}