Click here to Skip to main content
15,887,027 members
Home / Discussions / Database
   

Database

 
GeneralRe: Problem : Retrive Data with ref table Pin
Wendelius26-Oct-08 5:28
mentorWendelius26-Oct-08 5:28 
GeneralRe: Problem : Retrive Data with ref table Pin
Ahmed R El Bohoty26-Oct-08 8:15
Ahmed R El Bohoty26-Oct-08 8:15 
GeneralRe: Problem : Retrive Data with ref table Pin
Wendelius26-Oct-08 8:23
mentorWendelius26-Oct-08 8:23 
GeneralRe: Problem : Retrive Data with ref table Pin
Ahmed R El Bohoty26-Oct-08 8:25
Ahmed R El Bohoty26-Oct-08 8:25 
GeneralRe: Problem : Retrive Data with ref table Pin
Wendelius26-Oct-08 8:33
mentorWendelius26-Oct-08 8:33 
GeneralRe: Problem : Retrive Data with ref table Pin
Ahmed R El Bohoty26-Oct-08 8:47
Ahmed R El Bohoty26-Oct-08 8:47 
GeneralRe: Problem : Retrive Data with ref table Pin
Wendelius26-Oct-08 10:59
mentorWendelius26-Oct-08 10:59 
GeneralRe: Problem : Retrive Data with ref table Pin
Ahmed R El Bohoty26-Oct-08 13:25
Ahmed R El Bohoty26-Oct-08 13:25 
I Make some changes in code and data displayed but not displayed in normal form but each data in column displayed in row and no header text to columns.and the question also if i make another method to update data , my work is to do changes in destination array and compare the id that hold in array with the record in db and apply changes or wat?

public ArrayList RetriveStdentInfo()
   {
       SqlCommand cmd = new SqlCommand();
       cmd.Connection = myCon;
       cmd.CommandText = "dbo.StoredProcedure2";
       //cmd.Parameters=ParameterDirection.ReturnValue;
       cmd.CommandType = CommandType.StoredProcedure;
       myCon.Open();
       IDataReader reader = cmd.ExecuteReader(CommandBehavior.CloseConnection);
       ArrayList seqCat = new ArrayList();
       ArrayList seqStudent = new ArrayList();
       <code>ArrayList destnation = new ArrayList();</code>
       int prevCatId = 0;
       while (reader.Read())
       {

           MyStudent std = new MyStudent();
           std.Stid = reader.GetInt32(0);
           std.Sname = reader.GetString(reader.GetOrdinal("stname"));
           std.Catgid = reader.GetInt32(reader.GetOrdinal("Catgid"));
           if (prevCatId != reader.GetInt32(reader.GetOrdinal("Catgid")))
           {
               CatgBL cat = new CatgBL();
               cat.CatgName = reader.GetString(reader.GetOrdinal("CatgName"));
               seqCat.Add(cat);
               prevCatId = reader.GetInt32(reader.GetOrdinal("Catgid"));
           }
           seqStudent.Add(std);

       }

    <code>   foreach ( MyStudent var in seqStudent)
       {
           destnation.Add((int)var.Catgid);
           destnation.Add((string)var.Sname);
           destnation.Add((int)var.Stid);
       }
       foreach (CatgBL var in seqCat)
       {
           destnation.Add((int)var.Cid);
           destnation.Add((string)var.CatgName);
       }
        return destnation;</code>
   }

GeneralRe: Problem : Retrive Data with ref table Pin
Wendelius27-Oct-08 9:10
mentorWendelius27-Oct-08 9:10 
AnswerRe: Problem : Retrive Data with ref table Pin
Rami Said Abd Alhalim27-Oct-08 2:20
Rami Said Abd Alhalim27-Oct-08 2:20 
GeneralRe: Problem : Retrive Data with ref table Pin
Ahmed R El Bohoty27-Oct-08 2:23
Ahmed R El Bohoty27-Oct-08 2:23 
GeneralRe: Problem : Retrive Data with ref table Pin
Rami Said Abd Alhalim27-Oct-08 3:13
Rami Said Abd Alhalim27-Oct-08 3:13 
GeneralRe: Problem : Retrive Data with ref table Pin
Ahmed R El Bohoty27-Oct-08 3:19
Ahmed R El Bohoty27-Oct-08 3:19 
QuestionMoving Data Between Tables Pin
Meysam Mahfouzi26-Oct-08 0:49
Meysam Mahfouzi26-Oct-08 0:49 
AnswerRe: Moving Data Between Tables Pin
Wendelius26-Oct-08 1:29
mentorWendelius26-Oct-08 1:29 
GeneralRe: Moving Data Between Tables Pin
Meysam Mahfouzi26-Oct-08 2:34
Meysam Mahfouzi26-Oct-08 2:34 
GeneralRe: Moving Data Between Tables Pin
Wendelius26-Oct-08 2:39
mentorWendelius26-Oct-08 2:39 
AnswerRe: Moving Data Between Tables Pin
PIEBALDconsult29-Oct-08 5:38
mvePIEBALDconsult29-Oct-08 5:38 
GeneralRe: Moving Data Between Tables Pin
Meysam Mahfouzi29-Oct-08 10:20
Meysam Mahfouzi29-Oct-08 10:20 
GeneralRe: Moving Data Between Tables Pin
PIEBALDconsult29-Oct-08 11:39
mvePIEBALDconsult29-Oct-08 11:39 
GeneralRe: Moving Data Between Tables Pin
Meysam Mahfouzi29-Oct-08 17:21
Meysam Mahfouzi29-Oct-08 17:21 
GeneralRe: Moving Data Between Tables Pin
PIEBALDconsult30-Oct-08 4:28
mvePIEBALDconsult30-Oct-08 4:28 
GeneralRe: Moving Data Between Tables Pin
Meysam Mahfouzi30-Oct-08 8:12
Meysam Mahfouzi30-Oct-08 8:12 
GeneralRe: Moving Data Between Tables Pin
PIEBALDconsult30-Oct-08 10:26
mvePIEBALDconsult30-Oct-08 10:26 
GeneralRe: Moving Data Between Tables Pin
Meysam Mahfouzi31-Oct-08 19:59
Meysam Mahfouzi31-Oct-08 19:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.