Posts

Showing posts from April, 2014

PL/SQL Update Next Value of a Sequence

declare
    deger number:=0;
begin
    select SCHEMA_NAME.SEQ_ENG_ENG_BILGILERI_ID.nextval
    into deger
    from dual;

     dbms_output.put_line(deger);
end;

ALTER SEQUENCE PROBBYS.SEQ_ENG_ENG_BILGILERI_ID INCREMENT BY 1000;
SELECT PROBBYS.SEQ_ENG_ENG_BILGILERI_ID.NEXTVAL FROM dual;
ALTER SEQUENCE PROBBYS.SEQ_ENG_ENG_BILGILERI_ID INCREMENT BY 1;

C# Generics

//Main Program - Calling the GetResults Method string mesaiBitisSaati = CommonClass.GetResults<string>(SystemCodes.MZB, 1);
//CommonClass - GetOneResult Method publicstatic T GetResults<T>(SystemCodes sistemKodu, decimal parametreKodu) { try             { object param = GetOneResult(sistemKodu, parametreKodu); return (T)Convert.ChangeType(param, typeof(T));             } catch             { returndefault(T);             } }
//CommonClass - GetOneResult Method