Click here to Skip to main content
15,895,667 members
Home / Discussions / C#
   

C#

 
AnswerRe: static Object Pin
Colin Angus Mackay8-Oct-08 2:08
Colin Angus Mackay8-Oct-08 2:08 
QuestionCentralized exception handler and logger Pin
matixsc8-Oct-08 0:57
professionalmatixsc8-Oct-08 0:57 
AnswerRe: Centralized exception handler and logger Pin
Giorgi Dalakishvili8-Oct-08 1:14
mentorGiorgi Dalakishvili8-Oct-08 1:14 
AnswerRe: Centralized exception handler and logger Pin
matixsc8-Oct-08 2:16
professionalmatixsc8-Oct-08 2:16 
QuestionRe:Installing Flash player with windows set up Pin
RameshwerE8-Oct-08 0:19
RameshwerE8-Oct-08 0:19 
QuestionUpdate requires a valid UpdateCommand when passed DataRow collection with modified rows. [modified] Pin
astrovirgin7-Oct-08 23:36
astrovirgin7-Oct-08 23:36 
AnswerRe: Update requires a valid UpdateCommand when passed DataRow collection with modified rows. Pin
Giorgi Dalakishvili8-Oct-08 0:23
mentorGiorgi Dalakishvili8-Oct-08 0:23 
AnswerRe: Update requires a valid UpdateCommand when passed DataRow collection with modified rows. Pin
nelsonpaixao8-Oct-08 12:47
nelsonpaixao8-Oct-08 12:47 
listen,

i can´t debug that, because the way i code is different. D'Oh! | :doh:
Try this routine, may work out for you.

// connection string
public static string connection_string = "..."
// store procedure
public static string SP_whatever = "...";

// database connection (no parameters)
public static void DataGridView_Fill(DataGridView dgv, string store_procedure)
{
SqlConnection sql_conn = new SqlConnection(connection_string);
SqlCommand sql_cmd = new SqlCommand();
sql_cmd.Connection = sql_conn;
sql_cmd.CommandText = store_procedure;
sql_cmd.CommandType = CommandType.StoredProcedure;
sql_conn.Open();
SqlDataAdapter sql_da = new SqlDataAdapter();
sql_da.SelectCommand = sql_cmd;
DataTable dt = new DataTable();
sql_da.Fill(dt);
sql_conn.Close();
dgv.DataSource = dt;
}


nelsonpaixao@yahoo.com.br

trying to help & get help

QuestionProblem with free up memory! Pin
Ha ha ha ha ha ha ha ha7-Oct-08 23:24
Ha ha ha ha ha ha ha ha7-Oct-08 23:24 
AnswerRe: Problem with free up memory! Pin
Simon P Stevens8-Oct-08 0:11
Simon P Stevens8-Oct-08 0:11 
GeneralRe: Problem with free up memory! Pin
leppie8-Oct-08 1:53
leppie8-Oct-08 1:53 
GeneralRe: Problem with free up memory! Pin
Ha ha ha ha ha ha ha ha8-Oct-08 1:54
Ha ha ha ha ha ha ha ha8-Oct-08 1:54 
GeneralRe: Problem with free up memory! Pin
Simon P Stevens8-Oct-08 3:06
Simon P Stevens8-Oct-08 3:06 
GeneralRe: Problem with free up memory! Pin
Ha ha ha ha ha ha ha ha8-Oct-08 3:51
Ha ha ha ha ha ha ha ha8-Oct-08 3:51 
GeneralRe: Problem with free up memory! Pin
Simon P Stevens8-Oct-08 4:42
Simon P Stevens8-Oct-08 4:42 
GeneralRe: Problem with free up memory! Pin
DaveyM698-Oct-08 5:58
professionalDaveyM698-Oct-08 5:58 
GeneralRe: Problem with free up memory! Pin
Simon P Stevens8-Oct-08 22:58
Simon P Stevens8-Oct-08 22:58 
GeneralRe: Problem with free up memory! [modified] Pin
Mark Salsbery8-Oct-08 8:07
Mark Salsbery8-Oct-08 8:07 
GeneralRe: Problem with free up memory! Pin
Ha ha ha ha ha ha ha ha9-Oct-08 20:50
Ha ha ha ha ha ha ha ha9-Oct-08 20:50 
QuestionGet a whole column in a matrix Pin
xkrja7-Oct-08 21:37
xkrja7-Oct-08 21:37 
AnswerRe: Get a whole column in a matrix Pin
User 66587-Oct-08 21:48
User 66587-Oct-08 21:48 
QuestionHow to get whitespace in xml Pin
manju#1237-Oct-08 19:52
manju#1237-Oct-08 19:52 
AnswerRe: How to get whitespace in xml Pin
Pedram Behroozi7-Oct-08 20:18
Pedram Behroozi7-Oct-08 20:18 
GeneralRe: How to get whitespace in xml Pin
manju#1237-Oct-08 20:23
manju#1237-Oct-08 20:23 
GeneralRe: How to get whitespace in xml Pin
Pedram Behroozi7-Oct-08 20:29
Pedram Behroozi7-Oct-08 20:29 

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.