Undefined
By: Guest | Date: Oct 28 2011 20:17 | Format: UnrealScript | Expires: never | Size: 1.45 KB | Hits: 1058
- function getDBRefArchetypes(int aDatabaseIdx, out array<UGDB_Ref_Archetyp> aArchetypes)
- {
- local string lQuery;
- local UGDB_Ref_Archetyp lNewArchetyp;
- local array<UGDB_Ref_Archetyp> lArchetypes;
- local int lResIdx;
- aArchetypes.Length = 0;
- if(mRefArchetypes.Length > 0){
- aArchetypes = mRefArchetypes;
- return;
- }
- lQuery = UGDB_Manager(GetDBManager()).getDBStatement("Cache_GetArchetypes");
- mDLLAPI.SQL_selectDatabase(aDatabaseIdx);
- lResIdx = mDLLAPI.SQL_queryDatabase(lQuery);
- if(lResIdx >= 0){
- while(mDLLAPI.SQL_nextResult(lResIdx)){
- lNewArchetyp = Spawn(class'UGDB_Ref_Archetyp');
- lNewArchetyp.mDBTable = "UG_ARCHETYPES";
- `UGDB_InitString(lNewArchetyp.mName,30);
- `UGDB_InitString(lNewArchetyp.mIdent,30);
- mDLLAPI.SQL_getIntVal(lResIdx, "ID", lNewArchetyp.mDBId);
- mDLLAPI.SQL_getStringVal(lResIdx, "Name", lNewArchetyp.mName);
- mDLLAPI.SQL_getStringVal(lResIdx, "Ident", lNewArchetyp.mIdent);
- lArchetypes[lArchetypes.Length] = lNewArchetyp;
- }
- }
- mRefArchetypes = lArchetypes;
- aArchetypes = lArchetypes;
- }
- <---
- WILL BE
- --->
- class UGDB_DataProvider_Archetyp extends DB_DataProvider;
- DefaultProperties
- {
- mCommands(0)="SELECT ID, Name, Ident FROM UG_ARCHETYPES;"
- }
- AND
- mDPArchetypes = DB_Manager(Owner).RegisterDataProvider(mDLLAPI.Current(), class'UGDB_DataProvider_Archetyp');
- mDPArchetypes.Select();
Latest pastes
49 minutes ago
10 hours ago
1 days ago
2 days ago
2 days ago