deepak12333 0 Newbie Poster

hi

I am in deep trouble to loose my job please help me

I am working on a website where a user comes and login
when it enters a pop up screen appears where it is written continue or remind me later now i am unable to handle this functionality that on the 5th time a user logins if he did not coducted the survey that the remind me later screen grayed out and he need to fill survey
please help me about how to track the customer that it is his 5th time he is login and he must take survey
i m pasting my code please help me now

OracleConnection Conn = new OracleConnection("Data Source=xyz;User ID=SYSTEM;Password=omar;");
        OracleCommand cmd = new OracleCommand();
        cmd.Connection = Conn;
        Conn.Open();

        string strConn = Request.QueryString["uid"];

        //string orc = string.Empty;

        //orc = "insert into TABLE1(USERNAME,COUNTER) VALUES ('" + strConn + "','" + count1 + "')";
        //cmd.CommandText = orc;
        //cmd.ExecuteNonQuery();


        string test = string.Empty;

        test = "select COUNTER from TABLE1 where USERNAME =('" + strConn+"')";
        cmd.CommandText = test;

        cmd.ExecuteNonQuery();
        OracleDataReader odr = cmd.ExecuteReader();
        odr.Read();
        int count = Int32.Parse(odr.GetValue(0).ToString());

        if (count < 5)
        {
            count++;
            string test1 = "update TABLE1 set(COUNTER= '" + count + "') where (USERNAME= '" + strConn + "')";
            cmd.CommandText = test1;
        }
        else
        {
            btnRemind.Enabled = false;
        }


        Conn.Close();


        Response.Redirect("HomePage1.aspx?uid=" + strConn);
    } 

value in database is not updating