Click here to Skip to main content
15,887,585 members
Home / Discussions / C#
   

C#

 
AnswerRe: Usings for "ManagementClass" in Visual C# 2010 Pin
Luc Pattyn30-Apr-11 2:59
sitebuilderLuc Pattyn30-Apr-11 2:59 
GeneralRe: Usings for "ManagementClass" in Visual C# 2010 Pin
rms12330-Apr-11 3:20
professionalrms12330-Apr-11 3:20 
GeneralRe: Usings for "ManagementClass" in Visual C# 2010 Pin
PIEBALDconsult30-Apr-11 3:37
mvePIEBALDconsult30-Apr-11 3:37 
GeneralRe: Usings for "ManagementClass" in Visual C# 2010 Pin
Luc Pattyn30-Apr-11 4:08
sitebuilderLuc Pattyn30-Apr-11 4:08 
GeneralRe: Usings for "ManagementClass" in Visual C# 2010 Pin
PIEBALDconsult30-Apr-11 4:59
mvePIEBALDconsult30-Apr-11 4:59 
AnswerRe: Usings for "ManagementClass" in Visual C# 2010 Pin
Luc Pattyn30-Apr-11 5:09
sitebuilderLuc Pattyn30-Apr-11 5:09 
QuestionProgram With Multi language support Pin
Arunkumar.Koloth29-Apr-11 17:32
Arunkumar.Koloth29-Apr-11 17:32 
AnswerRe: Program With Multi language support Pin
OriginalGriff29-Apr-11 20:54
mveOriginalGriff29-Apr-11 20:54 
If you look here: http://stackoverflow.com/questions/119568/best-practice-to-make-a-multi-language-application-in-c-winforms[^] there is a discussion of the various ways to achieve this. The way you have selected is not necessarily the best: it requires a version of SQLServer to be available to each PC on which your app will run, which may not be possible or desirable.

However:
public void changelanguage(object code) {
    con.Open();
    SqlCommand com = new SqlCommand();
    SqlDataReader dr;
    com.Parameters.AddWithValue("language", code);
    com.CommandText = "SELECT translated FROM translation WHERE languagecode=@language";
    dr=com.ExecuteReader();
    while (dr.Read()) {
        if ((string) dr["textinenglish"] == theWordIWantToTranslate) {
            ...
            }
        }
    }


BTW: Please remember that you are responsible for Close-ing and Dispose-ing all of the SQLCommand and SQLConnection objects you create!
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.

Manfred R. Bihy: "Looks as if OP is learning resistant."

AnswerRe: Program With Multi language support Pin
PIEBALDconsult1-May-11 3:13
mvePIEBALDconsult1-May-11 3:13 
GeneralRe: Program With Multi language support Pin
Arunkumar.Koloth1-May-11 6:31
Arunkumar.Koloth1-May-11 6:31 
GeneralRe: Program With Multi language support Pin
PIEBALDconsult1-May-11 17:28
mvePIEBALDconsult1-May-11 17:28 
Questionc# Pin
mansingh3529-Apr-11 6:25
mansingh3529-Apr-11 6:25 
AnswerRe: c# Pin
Keith Barrow29-Apr-11 6:44
professionalKeith Barrow29-Apr-11 6:44 
GeneralRe: c# Pin
OriginalGriff29-Apr-11 8:25
mveOriginalGriff29-Apr-11 8:25 
GeneralRe: c# Pin
Keith Barrow29-Apr-11 8:34
professionalKeith Barrow29-Apr-11 8:34 
GeneralRe: c# Pin
SledgeHammer0129-Apr-11 8:42
SledgeHammer0129-Apr-11 8:42 
AnswerRe: c# Pin
PIEBALDconsult29-Apr-11 17:25
mvePIEBALDconsult29-Apr-11 17:25 
AnswerRe: c# Pin
ambarishtv29-Apr-11 22:51
ambarishtv29-Apr-11 22:51 
AnswerRe: c# Pin
Prasanta_Prince30-Apr-11 7:14
Prasanta_Prince30-Apr-11 7:14 
QuestionFile access permissions in program files folder Pin
lukeer29-Apr-11 3:46
lukeer29-Apr-11 3:46 
AnswerRe: File access permissions in program files folder Pin
dan!sh 29-Apr-11 5:26
professional dan!sh 29-Apr-11 5:26 
AnswerRe: File access permissions in program files folder Pin
Luc Pattyn29-Apr-11 8:09
sitebuilderLuc Pattyn29-Apr-11 8:09 
GeneralRe: File access permissions in program files folder Pin
lukeer1-May-11 21:04
lukeer1-May-11 21:04 
AnswerRe: File access permissions in program files folder Pin
Luc Pattyn1-May-11 22:50
sitebuilderLuc Pattyn1-May-11 22:50 
QuestionHow to add the data from list to a class objects Pin
Rocky2329-Apr-11 0:59
Rocky2329-Apr-11 0:59 

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.