string dt = "SELECT Last_login,SnapNo,Membership from [User] where FB_Id='" + uid1 + "'";
da = new SqlDataAdapter(dt, con);
ds1 = new DataSet();
da.Fill(ds1);
DateTime dt1 = Convert.ToDateTime(ds1.Tables[0].Rows[0].ItemArray);
Int32 snapno = Convert.ToInt32(ds1.Tables[0].Columns["Last_login"]);
string membership = ds1.Tables[0].Rows[2].ItemArray.ToString();
DateTime dt2 = DateTime.Now;
My code is as follows and i am not able to solve this problem
Please help
It’s hard to understand what is your code supposed to do and it seems you don’t understand what do
Rows,Columns, andItemArraymean. You should probably read their documentation.What I think you’re trying to do is something like this: