GetColumnDatabaseConnection() public static méthode

Get a column from a fetched a database rowset.
public static GetColumnDatabaseConnection ( int ConnectionHandle, int ColumnIndex, ACR_ServerMisc Script ) : string
ConnectionHandle int Supplies a database connection /// handle.
ColumnIndex int Supplies the column index.
Script ACR_ServerMisc Supplies the script object.
Résultat string
        public Int32 ScriptMain([In] object[] ScriptParameters, [In] Int32 DefaultReturnCode)
        {
            Int32  ReturnCode;
            int    RequestType = (int)ScriptParameters[0];
            int    P0          = (int)ScriptParameters[1];
            int    P2          = (int)ScriptParameters[2];
            string P3          = (string)ScriptParameters[3];
            string P4          = (string)ScriptParameters[4];
            string P5          = (string)ScriptParameters[5];
            uint   P6          = (uint)ScriptParameters[6];

            switch ((REQUEST_TYPE)RequestType)
            {
            case REQUEST_TYPE.EXECUTE_UPDATER_SCRIPT:
            {
                ReturnCode = ExecuteUpdaterScript() ? TRUE : FALSE;
            }
            break;

            case REQUEST_TYPE.CREATE_AREA_INSTANCE:
            {
                uint ReturnArea = CreateAreaInstance(P6);

                if (ReturnArea == OBJECT_INVALID)
                {
                    ReturnCode = FALSE;
                }
                else
                {
                    ReturnCode = TRUE;
                    SetLocalObject(GetModule(), "ACR_SERVER_MISC_RETURN_OBJECT", ReturnArea);
                }
            }
            break;

            case REQUEST_TYPE.RELEASE_AREA_INSTANCE:
            {
                ReleaseInstancedArea(P6);
                ReturnCode = TRUE;
            }
            break;

            case REQUEST_TYPE.SET_DICTIONARY_VALUE:
            {
                DictionarySetString(P3, P4, P5);
                ReturnCode = TRUE;
            }
            break;

            case REQUEST_TYPE.GET_DICTIONARY_VALUE:
            {
                string ReturnValue;
                bool   CompletedOk = DictionaryGetString(P3, P4, out ReturnValue);

                if (!CompletedOk)
                {
                    ReturnCode = FALSE;
                }
                else
                {
                    SetLocalString(GetModule(), "ACR_SERVER_MISC_RETURN_STRING", ReturnValue);
                    ReturnCode = TRUE;
                }
            }
            break;

            case REQUEST_TYPE.FIRST_ITERATE_DICTIONARY:
            {
                string ReturnKey;
                bool   CompletedOk = DictionaryIterateFirst(P3, out ReturnKey);

                if (!CompletedOk)
                {
                    ReturnCode = FALSE;
                }
                else
                {
                    SetLocalString(GetModule(), "ACR_SERVER_MISC_RETURN_STRING", ReturnKey);
                    ReturnCode = TRUE;
                }
            }
            break;

            case REQUEST_TYPE.NEXT_ITERATE_DICTIONARY:
            {
                string ReturnKey;
                bool   CompletedOk = DictionaryIterateNext(P3, out ReturnKey);

                if (!CompletedOk)
                {
                    ReturnCode = FALSE;
                }
                else
                {
                    SetLocalString(GetModule(), "ACR_SERVER_MISC_RETURN_STRING", ReturnKey);
                    ReturnCode = TRUE;
                }
            }
            break;

            case REQUEST_TYPE.DELETE_DICTIONARY_KEY:
            {
                DictionaryDeleteKey(P3, P4);
                ReturnCode = TRUE;
            }
            break;

            case REQUEST_TYPE.CLEAR_DICTIONARY:
            {
                DictionaryClear(P3);
                ReturnCode = TRUE;
            }
            break;

            case REQUEST_TYPE.RUN_POWERSHELL_SCRIPTLET:
            {
                ReturnCode = RunPowerShellScriptlet(P3, P6) ? TRUE : FALSE;
            }
            break;

            case REQUEST_TYPE.CREATE_DATABASE_CONNECTION:
            {
                ReturnCode = ScriptDatabaseConnection.CreateScriptDatabaseConnection(P3, (ScriptDatabaseConnectionFlags)P0);
            }
            break;

            case REQUEST_TYPE.DESTROY_DATABASE_CONNECTION:
            {
                ReturnCode = ScriptDatabaseConnection.DestroyDatabaseConnection(P0) ? TRUE : FALSE;
            }
            break;

            case REQUEST_TYPE.QUERY_DATABASE_CONNECTION:
            {
                ReturnCode = ScriptDatabaseConnection.QueryDatabaseConnection(P0, P3, this) ? TRUE : FALSE;
            }
            break;

            case REQUEST_TYPE.FETCH_DATABASE_CONNECTION:
            {
                ReturnCode = ScriptDatabaseConnection.FetchDatabaseConnection(P0, this) ? TRUE : FALSE;
            }
            break;

            case REQUEST_TYPE.GET_COLUMN_DATABASE_CONNECTION:
            {
                string Data = ScriptDatabaseConnection.GetColumnDatabaseConnection(P0, P2, this);

                if (Data == null)
                {
                    ReturnCode = FALSE;
                }
                else
                {
                    SetLocalString(GetModule(), "ACR_SERVER_MISC_RETURN_STRING", Data);
                    ReturnCode = TRUE;
                }
            }
            break;

            case REQUEST_TYPE.GET_AFFECTED_ROW_COUNT_DATABASE_CONNECTION:
            {
                ReturnCode = ScriptDatabaseConnection.GetAffectedRowCountDatabaseConnection(P0, this);
            }
            break;

            case REQUEST_TYPE.ESCAPE_STRING_DATABASE_CONNECTION:
            {
                string Data = ScriptDatabaseConnection.EscapeStringDatabaseConnection(P0, P3, this);

                if (Data == null)
                {
                    ReturnCode = FALSE;
                }
                else
                {
                    SetLocalString(GetModule(), "ACR_SERVER_MISC_RETURN_STRING", Data);
                    ReturnCode = TRUE;
                }
            }
            break;

            case REQUEST_TYPE.GET_STACK_TRACE:
            {
                StackTrace Trace = new StackTrace(true);

                SetLocalString(GetModule(), "ACR_SERVER_MISC_RETURN_STRING", Trace.ToString());
                ReturnCode = TRUE;
            }
            break;

            case REQUEST_TYPE.GET_SALTED_MD5:
            {
                string SaltedMD5 = GetSaltedMD5(P3);

                SetLocalString(GetModule(), "ACR_SERVER_MISC_RETURN_STRING", SaltedMD5);
                ReturnCode = TRUE;
            }
            break;

            case REQUEST_TYPE.GET_HAS_DATABASE_STORE:
            {
                string Campaign = P3;

                ReturnCode = CampaignObjectFileStore.GetHasDatabaseStore(Campaign) ? TRUE : FALSE;
            }
            break;

            case REQUEST_TYPE.DELETE_DATABASE_STORE:
            {
                string Campaign = P3;

                ReturnCode = CampaignObjectFileStore.DeleteDatabaseStore(Campaign) ? TRUE : FALSE;
            }
            break;

            case REQUEST_TYPE.DELETE_DATABASE_STORE_AT_INDEX:
            {
                string Campaign = P3;
                int    Index    = P0;

                ReturnCode = CampaignObjectFileStore.DeleteDatabaseStoreAtIndex(Campaign, Index) ? TRUE : FALSE;
            }
            break;

            case REQUEST_TYPE.SHOW_COMPILER_LOG:
            {
                string FileName = String.Format("{0}{1}ALFAModuleRecompile.log", Path.GetTempPath(), Path.DirectorySeparatorChar);

                SendMessageToPC(OBJECT_SELF, "Last module recompilation log:");

                try
                {
                    SendMessageToPC(OBJECT_SELF, File.ReadAllText(FileName));
                }
                catch (Exception)
                {
                    SendMessageToPC(OBJECT_SELF, "<no log file exists>");
                }

                ReturnCode = TRUE;
            }
            break;

            case REQUEST_TYPE.RESTART_SERVER:
            {
                ALFA.SystemInfo.ShutdownGameServer(this);
                ReturnCode = TRUE;
            }
            break;

            default:
                throw new ApplicationException("Invalid server misc command " + RequestType.ToString());
            }

            return(ReturnCode);
        }