internal void SetAttribute( OCI.ATTR attribute, string value, OciHandle errorHandle ) { int valueLengthAsChars = value.Length; byte[] valueAsBytes = new byte[valueLengthAsChars * 4]; int valueLengthAsBytes = GetBytes(value.ToCharArray(), 0, valueLengthAsChars, valueAsBytes, 0); int rc = TracedNativeMethods.OCIAttrSet( this, // trgthndlp/trghndltyp valueAsBytes, // attributep valueLengthAsBytes, // size attribute, // attrtype errorHandle // errhp ); if (0 != rc) { OracleException.Check(errorHandle, rc); } GC.KeepAlive(this); }
internal void SetAttribute(OCI.ATTR attribute, int value, OciErrorHandle errorHandle) { int rc = TracedNativeMethods.OCIAttrSet(this, ref value, 0, attribute, errorHandle); if (rc != 0) { OracleException.Check(errorHandle, rc); } }
internal void SetAttribute(OCI.ATTR attribute, string value, OciErrorHandle errorHandle) { uint length = (uint)value.Length; byte[] bytes = new byte[length * 4]; uint size = this.GetBytes(value.ToCharArray(), 0, length, bytes, 0); int rc = TracedNativeMethods.OCIAttrSet(this, bytes, size, attribute, errorHandle); if (rc != 0) { OracleException.Check(errorHandle, rc); } }
internal void SetAttribute( OCI.ATTR attribute, OciHandle value, OciHandle errorHandle ) { int rc = TracedNativeMethods.OCIAttrSet( this, // trgthndlp/trghndltyp value, // attributep 0, // size attribute, // attrtype errorHandle // errhp ); if (0 != rc) { OracleException.Check(errorHandle, rc); } GC.KeepAlive(this); }