Example #1
0
        public bool BeginSession(OciCredentialType credentialType, OciSessionMode mode, OciErrorHandle error)
        {
            errorHandle = error;

            int status;

            if (credentialType == OciCredentialType.RDBMS)
            {
                if (!SetCredentialAttributes(errorHandle))
                {
                    return(false);
                }
            }

            status = OciCalls.OCISessionBegin(Service,
                                              errorHandle,
                                              Handle,
                                              credentialType,
                                              mode);

            if (status != 0)
            {
                return(false);
            }

            begun = true;

            return(true);
        }
Example #2
0
 internal static int OCISessionBegin(IntPtr svchp,
     IntPtr errhp,
     IntPtr usrhp,
     OciCredentialType credt,
     OciSessionMode mode)
 {
     #if TRACE
     Trace.WriteLineIf(traceOci, "OCISessionBegin", "OCI");
     #endif
     return OciNativeCalls.OCISessionBegin (svchp, errhp, usrhp, credt, mode);
 }
Example #3
0
        public bool BeginSession(OciCredentialType credentialType, OciSessionMode mode, OciErrorHandle error)
        {
            errorHandle = error;

            int status = 0;

            if (credentialType == OciCredentialType.RDBMS)
            {
                status = OciCalls.OCIAttrSetString(this,
                                                   OciHandleType.Session,
                                                   username,
                                                   (uint)username.Length,
                                                   OciAttributeType.Username,
                                                   errorHandle);

                if (status != 0)
                {
                    return(false);
                }

                status = OciCalls.OCIAttrSetString(this,
                                                   OciHandleType.Session,
                                                   password,
                                                   (uint)password.Length,
                                                   OciAttributeType.Password,
                                                   errorHandle);

                if (status != 0)
                {
                    return(false);
                }
            }

            status = OciCalls.OCISessionBegin(Service,
                                              errorHandle,
                                              Handle,
                                              credentialType,
                                              mode);

            if (status != 0)
            {
                return(false);
            }

            begun = true;

            return(true);
        }
		public bool BeginSession (OciCredentialType credentialType, OciSessionMode mode, OciErrorHandle error)
		{
			errorHandle = error;

			int status = 0;

			if (credentialType == OciCredentialType.RDBMS) {
				status = OciCalls.OCIAttrSetString (this,
					OciHandleType.Session,
					username,
					(uint) username.Length,
					OciAttributeType.Username,
					errorHandle);

				if (status != 0)
					return false;

				status = OciCalls.OCIAttrSetString (this,
					OciHandleType.Session,
					password,
					(uint) password.Length,
					OciAttributeType.Password,
					errorHandle);

				if (status != 0)
					return false;
			}

			status = OciCalls.OCISessionBegin (Service,
						errorHandle,
						Handle,
						credentialType,
						mode);

			if (status != 0)
				return false;

			begun = true;

			return true;
		}
Example #5
0
		public bool BeginSession (OciCredentialType credentialType, OciSessionMode mode, OciErrorHandle error)
		{
			errorHandle = error;

			int status;

			if (credentialType == OciCredentialType.RDBMS) {
				if (!SetCredentialAttributes (errorHandle))
					return false;
			}

			status = OciCalls.OCISessionBegin (Service,
						errorHandle,
						Handle,
						credentialType,
						mode);

			if (status != 0)
				return false;

			begun = true;

			return true;
		}
Example #6
0
		internal static int OCISessionBegin (IntPtr svchp,
			IntPtr errhp,
			IntPtr usrhp,
			OciCredentialType credt,
			OciSessionMode mode)
		{
			#if TRACE
			Trace.WriteLineIf(traceOci, "OCISessionBegin", "OCI");
			#endif
			return OciNativeCalls.OCISessionBegin (svchp, errhp, usrhp, credt, mode);
		}
Example #7
0
 internal static extern int OCISessionBegin(IntPtr svchp,
     IntPtr errhp,
     IntPtr usrhp,
     [MarshalAs (UnmanagedType.U4)] OciCredentialType credt,
     [MarshalAs (UnmanagedType.U4)] OciSessionMode mode);