Jump to content

Recommended Posts

Posted (edited)

the problem is here

 

 public static List GetClientByStaffId(string STAFF_CL)
       {
           List clients = new List();
           SqlCommand selectCmd = new SqlCommand("select * from TRS_LUT_CLIENT C, TRS_TASKS T where C.CLIENT_ID = T.CLIENT_ID and  T.STAFF_CL = @ STAFF_CL");
           selectCmd.Parameters.Add("STAFF_CL", SqlDbType.NVarChar).Value = STAFF_CL;
           
           DataTable dt = DBManager.ExecuteQuery(selectCmd);
           foreach (DataRow row in dt.Rows)
           {
               clients.Add(new TRS_LUT_CLIENTS(int.Parse(dt.Rows[0]["CLIENT_ID"].ToString()), dt.Rows[0]["CLIENT_NAME"].ToString(), dt.Rows[0]["CLIENT_ADDRESS"].ToString(), dt.Rows[0]["CLIENT_DESCRIPTION"].ToString()));
           }
           return clients;
       }

 

i can't c it at all !! i thought that it may be the parameters.add . but what exactly i don't know !!

Edited by pansy
Posted (edited)

It wouldn't be the space here would it ?

 

@ STAFF_CL should be @STAFF_CL ? or no @ at all, been a while since I did sql and I did it all with stored procs too. :)

Edited by caffrey
  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...