This project is read-only.
1
Vote

Stored Procedure with return type

description

Hi,
I'm not able to get data from Oracle DB using stored procedure. Here is the code, but it always returns null. I couldn't make it work. Does enybody have sone idea?
    public static InsuredPersonData GetInsuredPersonInfo(string jmbg)
    {
        InsuredPersonData temp = InitializaDbConnecton().ContextEtpm.Sql("PROD.GET_PERSON_FOR_JMBG")
                                                                    .CommandType(DbCommandTypes.StoredProcedure)
                                                                    //.Parameter("CM_JMBG", jmbg, DataTypes.String, FluentData.ParameterDirection.Input, 16)
                                                                    //.Parameter("CM_IME", CM_IME, DataTypes.String, FluentData.ParameterDirection.Output, 254)
                                                                    //.Parameter("CM_PREZIME", CM_PREZIME, DataTypes.String, FluentData.ParameterDirection.Output, 254)
                                                                    //.Parameter("CM_POL", CM_POL, DataTypes.String, FluentData.ParameterDirection.Output, 254)
                                                                    //.Parameter("CM_IME_RODITELJA", CM_IME_RODITELJA, DataTypes.String, FluentData.ParameterDirection.Output, 254)
                                                                    //.Parameter("CM_DATUM_RODJENJA", CM_DATUM_RODJENJA, DataTypes.String, FluentData.ParameterDirection.Output, 254)
                                                                    //.Parameter("CM_DRZAVLJANSTVO", CM_DRZAVLJANSTVO, DataTypes.String, FluentData.ParameterDirection.Output, 254)
                                                                    //.Parameter("CM_OPSTINA", CM_OPSTINA, DataTypes.String, FluentData.ParameterDirection.Output, 254)
                                                                    //.Parameter("CM_NASELJE", CM_NASELJE, DataTypes.String, FluentData.ParameterDirection.Output, 254)
                                                                    //.Parameter("CM_ULICA", CM_ULICA, DataTypes.String, FluentData.ParameterDirection.Output, 254)
                                                                    //.Parameter("CM_BROJ", CM_BROJ, DataTypes.String, FluentData.ParameterDirection.Output, 254)
                                                                    //.Parameter("CM_PTT", CM_PTT, DataTypes.String, FluentData.ParameterDirection.Output, 254)
                                                                    //.Parameter("CM_ZANIMANJE_SSS", CM_ZANIMANJE_SSS, DataTypes.String, FluentData.ParameterDirection.Output, 254)
                                                                    //.Parameter("CM_CR_BR", CM_CR_BR, DataTypes.String, FluentData.ParameterDirection.Output, 254)
                                                                    //.Parameter("CM_LBO_BR", CM_LBO_BR, DataTypes.String, FluentData.ParameterDirection.Output, 254)
                                                                    .Parameter("CM_JMBG", jmbg, DataTypes.String, FluentData.ParameterDirection.Input, 16)
                                                                    .ParameterOut("CM_IME", DataTypes.String, 254)
                                                                    .ParameterOut("CM_PREZIME", DataTypes.String, 254)
                                                                    .ParameterOut("CM_POL", DataTypes.String, 254)
                                                                    .ParameterOut("CM_IME_RODITELJA", DataTypes.String, 254)
                                                                    .ParameterOut("CM_DATUM_RODJENJA", DataTypes.String, 254)
                                                                    .ParameterOut("CM_DRZAVLJANSTVO", DataTypes.String, 254)
                                                                    .ParameterOut("CM_OPSTINA", DataTypes.String, 254)
                                                                    .ParameterOut("CM_NASELJE", DataTypes.String, 254)
                                                                    .ParameterOut("CM_ULICA", DataTypes.String, 254)
                                                                    .ParameterOut("CM_BROJ", DataTypes.String, 254)
                                                                    .ParameterOut("CM_PTT", DataTypes.String, 254)
                                                                    .ParameterOut("CM_ZANIMANJE_SSS", DataTypes.String, 254)
                                                                    .ParameterOut("CM_CR_BR", DataTypes.String, 254)
                                                                    .ParameterOut("CM_LBO_BR", DataTypes.String, 254)
                                                                    .QuerySingle<InsuredPersonData>();
        return temp;
    }

comments