Click here to Skip to main content
15,912,329 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to get all the shares from a machine Pin
matt23lucier9-Jun-08 7:17
matt23lucier9-Jun-08 7:17 
GeneralRe: How to get all the shares from a machine Pin
matt23lucier9-Jun-08 7:58
matt23lucier9-Jun-08 7:58 
Questionmaking a white black smooth animation Pin
Sajjad Izadi9-Jun-08 6:39
Sajjad Izadi9-Jun-08 6:39 
AnswerRe: making a white black smooth animation Pin
Christian Graus9-Jun-08 6:40
protectorChristian Graus9-Jun-08 6:40 
GeneralRe: making a white black smooth animation Pin
Sajjad Izadi9-Jun-08 6:49
Sajjad Izadi9-Jun-08 6:49 
GeneralRe: making a white black smooth animation Pin
Christian Graus9-Jun-08 7:26
protectorChristian Graus9-Jun-08 7:26 
QuestionRe: making a white black smooth animation [modified] Pin
Sajjad Izadi9-Jun-08 7:49
Sajjad Izadi9-Jun-08 7:49 
AnswerRe: making a white black smooth animation Pin
Christian Graus9-Jun-08 13:25
protectorChristian Graus9-Jun-08 13:25 
QuestionChanging IIS Settings Pin
Yourbuddypal9-Jun-08 5:52
Yourbuddypal9-Jun-08 5:52 
AnswerRe: Changing IIS Settings Pin
Yourbuddypal9-Jun-08 8:33
Yourbuddypal9-Jun-08 8:33 
QuestionNamespace? Pin
#realJSOP9-Jun-08 5:27
professional#realJSOP9-Jun-08 5:27 
AnswerRe: Namespace? Pin
Judah Gabriel Himango9-Jun-08 5:37
sponsorJudah Gabriel Himango9-Jun-08 5:37 
GeneralRe: Namespace? Pin
#realJSOP9-Jun-08 5:53
professional#realJSOP9-Jun-08 5:53 
QuestionCVS update failed Pin
humayunlalzad9-Jun-08 4:17
humayunlalzad9-Jun-08 4:17 
AnswerRe: CVS update failed Pin
benjymous9-Jun-08 5:05
benjymous9-Jun-08 5:05 
AnswerRe: CVS update failed Pin
Ashfield9-Jun-08 21:42
Ashfield9-Jun-08 21:42 
QuestionXML Writer and the ampersand Pin
ranro20069-Jun-08 3:37
ranro20069-Jun-08 3:37 
AnswerRe: XML Writer and the ampersand Pin
leppie9-Jun-08 3:45
leppie9-Jun-08 3:45 
AnswerRe: XML Writer and the ampersand Pin
PIEBALDconsult9-Jun-08 5:46
mvePIEBALDconsult9-Jun-08 5:46 
QuestionHow to execute an SQL statement from a DataSet? Pin
bouli9-Jun-08 3:29
bouli9-Jun-08 3:29 
AnswerRe: How to execute an SQL statement from a DataSet? Pin
leppie9-Jun-08 3:32
leppie9-Jun-08 3:32 
AnswerRe: How to execute an SQL statement from a DataSet? Pin
Vimalsoft(Pty) Ltd9-Jun-08 4:02
professionalVimalsoft(Pty) Ltd9-Jun-08 4:02 
GeneralRe: How to execute an SQL statement from a DataSet? Pin
bouli9-Jun-08 4:40
bouli9-Jun-08 4:40 
GeneralRe: How to execute an SQL statement from a DataSet? Pin
Vimalsoft(Pty) Ltd9-Jun-08 5:02
professionalVimalsoft(Pty) Ltd9-Jun-08 5:02 
Hi man
here is the Code.

public Dataset GetData()
      {
          Dataset dsdata = new Dataset();
          /* As you said you, you have Successfully imported data into the Dataset
          * So, i dont know how you did it, but you should end up with the same thing as 
           * the above decleation of a Dataset and the Following Code will show you how to query a Dataset
           * 
           */
          String Constr = @"User ID=sa;Password=;Database=MyDB; Server =MYSERVER";

          SqlConnection con = new SqlConnection(Constr);  

          SqlCommand cmdselect = new SqlCommand("SELECT toto as X, count(titi)as Y from MY_TABLE GROUP BY X, ORDER BY X");
          
          cmdselect.CommandTimeout = 0 ;

          cmdselect.Connection = con; 

          SqlDataAdapter da = new SqlDataAdapter(cmdselect);
          //This is the Most important Part, if you have one table from the Dataset,you can leave it like this 
          da.Fill(dsdata);

          return dsdata;

      }


Tell me if you have Problems (vuyiswamb) Skype

Vuyiswa Maseko,

Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding

VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za


GeneralRe: How to execute an SQL statement from a DataSet? Pin
bouli9-Jun-08 5:17
bouli9-Jun-08 5:17 

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.