Click here to Skip to main content
15,883,928 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to set in run time a bitmap on pictureBox ?? Pin
Luc Pattyn12-Aug-10 2:01
sitebuilderLuc Pattyn12-Aug-10 2:01 
GeneralRe: How to set in run time a bitmap on pictureBox ?? Pin
Yanshof12-Aug-10 2:10
Yanshof12-Aug-10 2:10 
GeneralRe: How to set in run time a bitmap on pictureBox ?? Pin
Luc Pattyn12-Aug-10 2:36
sitebuilderLuc Pattyn12-Aug-10 2:36 
QuestionHow to compile (make) setup project in command line Pin
mersad0011-Aug-10 21:35
mersad0011-Aug-10 21:35 
AnswerRe: How to compile (make) setup project in command line Pin
N a v a n e e t h11-Aug-10 23:20
N a v a n e e t h11-Aug-10 23:20 
GeneralMSBUILD can't compile vdproj!!!!!!!!!!!!!!!!!! Pin
mersad0012-Aug-10 4:07
mersad0012-Aug-10 4:07 
QuestionSqlCommand Pin
moein.serpico11-Aug-10 20:39
moein.serpico11-Aug-10 20:39 
AnswerRe: SqlCommand Pin
mersad0011-Aug-10 21:33
mersad0011-Aug-10 21:33 
Hi,
Specially parameters used to pass data to ur query , as inset update delete even select
select * 
from t1
where id = 12

this query always returns a fixed result, now going to make it gloabal, i mean change the 12 value to needed value, so u use parameters as:
select *
from t1
where id=@id


now in command line, u must set the parameter, look at this method as a sample:
private DataTable SelectParameter(int idvalue, bool useWithvalue)
{
    string constr = "";
    SqlConnection con = new SqlConnection(constr);
    SqlCommand cmd = new SqlCommand("select * from t1 where id=@id", con);

    if (useWithvalue)
    {
        cmd.Parameters.AddWithValue("@id", idvalue);

    }
    else
    {

        SqlParameter p = new SqlParameter("@id", SqlDbType.Int);
        p.Value = idvalue;
        cmd.Parameters.Add(p);
    }

    con.Open();
    DataTable dt = new DataTable();
    dt.Load(cmd.ExecuteReader());
    return dt;

}


in cases that u are going to set the value type of parameter u should use add else u could use both of them.
AnswerRe: SqlCommand Pin
PIEBALDconsult12-Aug-10 3:23
mvePIEBALDconsult12-Aug-10 3:23 
GeneralRe: SqlCommand Pin
Searril12-Aug-10 4:37
Searril12-Aug-10 4:37 
QuestionLinq Query Problem Pin
Kevin Marois11-Aug-10 4:59
professionalKevin Marois11-Aug-10 4:59 
AnswerRe: Linq Query Problem Pin
Ennis Ray Lynch, Jr.11-Aug-10 5:38
Ennis Ray Lynch, Jr.11-Aug-10 5:38 
GeneralRe: Linq Query Problem Pin
Kevin Marois11-Aug-10 5:44
professionalKevin Marois11-Aug-10 5:44 
GeneralAmazing Pin
Ennis Ray Lynch, Jr.11-Aug-10 7:04
Ennis Ray Lynch, Jr.11-Aug-10 7:04 
GeneralRe: Amazing Pin
Kevin Marois11-Aug-10 7:06
professionalKevin Marois11-Aug-10 7:06 
QuestionStringBuilder vs += on string Pin
Dewald11-Aug-10 4:16
Dewald11-Aug-10 4:16 
AnswerRe: StringBuilder vs += on string Pin
Eddy Vluggen11-Aug-10 4:19
professionalEddy Vluggen11-Aug-10 4:19 
GeneralRe: StringBuilder vs += on string Pin
Ian Shlasko11-Aug-10 4:31
Ian Shlasko11-Aug-10 4:31 
AnswerRe: StringBuilder vs += on string Pin
Nuri Ismail11-Aug-10 4:26
Nuri Ismail11-Aug-10 4:26 
AnswerRe: StringBuilder vs += on string [modified] Pin
Luc Pattyn11-Aug-10 4:30
sitebuilderLuc Pattyn11-Aug-10 4:30 
AnswerRe: StringBuilder vs += on string Pin
Richard Blythe11-Aug-10 4:38
Richard Blythe11-Aug-10 4:38 
AnswerRe: StringBuilder vs += on string Pin
Ennis Ray Lynch, Jr.11-Aug-10 4:43
Ennis Ray Lynch, Jr.11-Aug-10 4:43 
JokeRe: StringBuilder vs += on string Pin
Not Active11-Aug-10 9:08
mentorNot Active11-Aug-10 9:08 
GeneralRe: StringBuilder vs += on string Pin
Ennis Ray Lynch, Jr.11-Aug-10 9:35
Ennis Ray Lynch, Jr.11-Aug-10 9:35 
GeneralRe: StringBuilder vs += on string Pin
Luc Pattyn11-Aug-10 9:45
sitebuilderLuc Pattyn11-Aug-10 9:45 

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.