Click here to Skip to main content
15,911,785 members
Home / Discussions / C#
   

C#

 
GeneralRe: pass reference to a function. Pin
leppie24-Mar-05 7:30
leppie24-Mar-05 7:30 
GeneralRe: pass reference to a function. Pin
LeeeNN24-Mar-05 7:51
LeeeNN24-Mar-05 7:51 
Generalstylus problem Pin
SunSai24-Mar-05 6:42
SunSai24-Mar-05 6:42 
GeneralCrystal Report Pin
vuthaianh24-Mar-05 6:36
vuthaianh24-Mar-05 6:36 
GeneralCreate bidimensional array Pin
monicapinto24-Mar-05 6:02
monicapinto24-Mar-05 6:02 
GeneralC# Winform Deployment Pin
rt724-Mar-05 5:32
rt724-Mar-05 5:32 
GeneralRe: C# Winform Deployment Pin
Member 141845424-Mar-05 17:13
Member 141845424-Mar-05 17:13 
GeneralProblems fillind DataSet using Stored Procedures Pin
TechnoSpike24-Mar-05 5:07
TechnoSpike24-Mar-05 5:07 
Hi! I'm having trouble trying to fill a DataSet with the results of a procedure I wrote. The procedure has 1 parameters and is composed of a select query (select id,text from Users where id=id_passed_by_param). My problem regards using this procedure to fill a DataSet. I was trying to do this:

try{
// create and open a connection object
conn = new SqlConnection(string_conn);
conn.Open();
SqlCommand cmd = new SqlCommand
("Proc", conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new SqlParameter("@id", 1));
SqlDataAdapter da = new SqlDataAdapter(cmd);
// I'm stuck here...what can I do to fill the Dataset?
// normally I would do this:
// DataSet ds = new DataSet();
// da.fill(ds,"TableName");
// but in this case, what can I do?
}
finally
{
if (conn != null){
conn.Close();
}
}

Also I'm not exactly sure how I can execute the procedure...I don't want a DataReader (so I can't use the ExecuteReader()), unless I can somehow convert the data received by the procedure to the DataSet....Any help would be great!
GeneralRe: Problems fillind DataSet using Stored Procedures Pin
Colin Angus Mackay24-Mar-05 5:53
Colin Angus Mackay24-Mar-05 5:53 
GeneralRe: Problems fillind DataSet using Stored Procedures Pin
Member 68402524-Mar-05 8:26
Member 68402524-Mar-05 8:26 
GeneralUser selected color dropout Pin
montu337724-Mar-05 2:55
montu337724-Mar-05 2:55 
GeneralRe: User selected color dropout Pin
mav.northwind24-Mar-05 3:18
mav.northwind24-Mar-05 3:18 
GeneralRe: User selected color dropout Pin
montu337724-Mar-05 3:39
montu337724-Mar-05 3:39 
GeneralRe: User selected color dropout Pin
mav.northwind24-Mar-05 4:01
mav.northwind24-Mar-05 4:01 
GeneralRe: User selected color dropout Pin
montu337724-Mar-05 4:08
montu337724-Mar-05 4:08 
GeneralRe: User selected color dropout Pin
montu337724-Mar-05 23:16
montu337724-Mar-05 23:16 
GeneralGet text on screen Pin
Anonymous24-Mar-05 0:07
Anonymous24-Mar-05 0:07 
GeneralRe: Get text on screen Pin
mav.northwind24-Mar-05 0:35
mav.northwind24-Mar-05 0:35 
GeneralRe: Get text on screen Pin
Dave Kreskowiak24-Mar-05 3:19
mveDave Kreskowiak24-Mar-05 3:19 
GeneralRe: Get text on screen Pin
Colin Angus Mackay24-Mar-05 4:07
Colin Angus Mackay24-Mar-05 4:07 
GeneralRe: Get text on screen Pin
turbochimp24-Mar-05 12:10
turbochimp24-Mar-05 12:10 
GeneralRe: Get text on screen Pin
eggie524-Mar-05 14:59
eggie524-Mar-05 14:59 
Generalbits to byte Pin
Skipla23-Mar-05 23:57
Skipla23-Mar-05 23:57 
GeneralRe: bits to byte Pin
occcy24-Mar-05 1:38
occcy24-Mar-05 1:38 
GeneralRe: bits to byte Pin
Skipla24-Mar-05 23:24
Skipla24-Mar-05 23:24 

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.