Results 1 to 3 of 3

Thread: datagrid in vs2002 versus vs2005 express edtion

Threaded View

  1. #1

    Thread Starter
    Fanatic Member popskie's Avatar
    Join Date
    Jul 2005
    Location
    In my chair
    Posts
    666

    datagrid in vs2002 versus vs2005 express edtion

    hi,
    this code is work well in vs2002 C# but not in vs2005 express edition. Any have idea about the issue here? Or someone can give me in detail on how to put data to a datagrid in vs2005?

    Code:
    dataset ds = new dataset();					
    MySqlDataAdapter myadapter =	new MySqlDataAdapter();		
    myadapter.SelectCommand = new MySqlCommand();
    myadapter.SelectCommand.Connection  = stsqcon.getConnection();
    myadapter.SelectCommand.CommandText = " Select * from partmain a inner 
    join appmodel b on a.p_code=b.p_code inner join vehicle c on c.veh_code = 
    b.veh_code where b.veh_code =?veh_code order by p_desc";
    myadapter.SelectCommand.Parameters.Add("?veh_code",MySqlDbType.Int32 ,4);
    myadapter.SelectCommand.Parameters["?veh_code"].Value = lv1.SelectedItems[0].SubItems[1].Text;
    myadapter.Fill(ds,"partmain");		
    dataGrid1.DataSource = ds;
    thanks,

    Popskie
    Last edited by popskie; Nov 15th, 2005 at 12:31 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width