• 13 years ago


     This is EdwinMuthu   i got the two query how can i pass this two query in the single
    Dataadapter and fill it this think in Single DataSet


    Thanks in advance

  • 13 years ago

    If you're using SQL Server, and probably some other databases too but not Access, you can separate multiple SQL statements with semicolons.

  • 13 years ago
    i am using Adapter u fill the grid can u say how can  fill the datagrid using DataReader
  • 13 years ago

    Let's be clear about what's happeneing here.  You don't fill a DataGrid with a DataAdapter or a DataReader.  There are two distinct steps involved.  You get the data from the database using a DataAdapter or DataReader and populate a DataTable, then you bind that DataTable to a DataGrid to display the data.  If you want to edit the data and then save it back to the database then you should use a DataAdapter.  If you just want to display the data, or at least not save any changes back to the database then a DataReader is a better option.  You'll find a code example of populating a DataTable using a DataReader here.

  • 13 years ago

    Thanku Very much it is working very fine

                what can i do to transfer the data in the datagrid to Excel sheet in window forms. I was workin

  • 13 years ago

    You have two choices when dealing with Excel.  You can use Office Automation and control an instance of the Excel application directly.  This is very powerful but a bit complex for what you want to achieve, plus it requires Excel to be installed on the local machine.  The other option is to treat Excel as a database and use ADO.NET.  This would be the better option in your case I think.  I suggest that you search MSDN for more information on your preferred method.  Note that using Excel with ADO.NET is virtually the same as using Access with ADO.NET with just a few small changes.  See for details.

  • 13 years ago

    Thanks for u Reply,

           U r Spending ur precious hour with me and clearing my doubts thanks a lot .

          I got a new task now and i need to submit it in Afternoon.  and u need to help me.
          The task is i got MdI Form and i have three child forms so when i opens the form1 it should open
        and where as when i opens the form2 the form1 remains open . So What i need is, When i opens
        the form2, form1 should be closed and similarly when form3 is opend the form1,form2 should be
        Closed .  Pls help me


    Thanks in Advanced

  • 13 years ago

    I would question the use of MDI if all you want is one window open at a time.  That said, the parent form has an MdiChildren property that is an array of Forms.  When you want to open a child, simply Close the first element of that array, if one exists.

  • 13 years ago

    Sorry Sir, I cant get U Sir


        If U Dont Mind,  Can u send the code plz

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Computer science education cannot make anybody an expert programmer any more than studying brushes and pigment can make somebody an expert painter” - Eric Raymond