Home All Groups Group Topic Archive Search About

Help Please ADO .Net 2.0 Query at RunTime HELP

Author
24 Feb 2006 7:52 PM
spooke
HI all
    now are two days, 20 hours of work that i'm on this problem without a solution!!!
I think i'll become mad!!!

Here is the problem:

I Use C# 2.0 (VS .Net 2005) with thyped dataset
I Make my connection and the connection generates the DataTables and the TableAdapters
All ok really beautifull
I can add other queries at design time adding other TableAdapters

But my problem is:
I would like to make a query at runtime, the users choose something in the windows form and click on a button.
Then i whant to generate the query.
How to add a method to the tableadapter or is it an other whay?

Plesa if you whant to help me write down a bit of code because i'm really new in the oop and in c# too

thanks all
Gian Paolo

Author
24 Feb 2006 8:05 PM
Aboulfazl Hadi
Hi
I think TableAdapter is a design-time feature of Visual Studio 2005. It
generates a lot of code for you when you creating new query.

You can use directly SqlCommand & SqlConnection and get the data.

Best Regards,
A.Hadi
Author
25 Feb 2006 6:54 AM
Cor Ligthert [MVP]
Spooke,

Using the designtime Data wizards you probably cannot. Althouth the way can be to use the DataView, which has in version 2.0 very extended filter mechanismes.

Cor
  "spooke" <satspo***@libero.it> schreef in bericht news:43ff641a$0$5981$4fafbaef@reader2.news.tin.it...
  HI all
      now are two days, 20 hours of work that i'm on this problem without a solution!!!
  I think i'll become mad!!!

  Here is the problem:

  I Use C# 2.0 (VS .Net 2005) with thyped dataset
  I Make my connection and the connection generates the DataTables and the TableAdapters
  All ok really beautifull
  I can add other queries at design time adding other TableAdapters

  But my problem is:
  I would like to make a query at runtime, the users choose something in the windows form and click on a button.
  Then i whant to generate the query.
  How to add a method to the tableadapter or is it an other whay?

  Plesa if you whant to help me write down a bit of code because i'm really new in the oop and in c# too

  thanks all
  Gian Paolo

AddThis Social Bookmark Button