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

C#

 
GeneralRe: Reflection to load an assembly application wide (like referencing it) Pin
PIEBALDconsult2-Aug-10 3:54
mvePIEBALDconsult2-Aug-10 3:54 
GeneralRe: Reflection to load an assembly application wide (like referencing it) Pin
hoernchenmeister2-Aug-10 4:59
hoernchenmeister2-Aug-10 4:59 
GeneralRe: Reflection to load an assembly application wide (like referencing it) Pin
PIEBALDconsult2-Aug-10 12:28
mvePIEBALDconsult2-Aug-10 12:28 
GeneralRe: Reflection to load an assembly application wide (like referencing it) Pin
hoernchenmeister2-Aug-10 20:29
hoernchenmeister2-Aug-10 20:29 
AnswerRe: Reflection to load an assembly application wide (like referencing it) Pin
Bernhard Hiller1-Aug-10 22:01
Bernhard Hiller1-Aug-10 22:01 
GeneralRe: Reflection to load an assembly application wide (like referencing it) Pin
hoernchenmeister2-Aug-10 1:20
hoernchenmeister2-Aug-10 1:20 
QuestionUpperBound of Dynamic array Pin
Enobong Adahada29-Jul-10 22:36
Enobong Adahada29-Jul-10 22:36 
AnswerRe: UpperBound of Dynamic array Pin
Sathesh Sakthivel29-Jul-10 23:35
Sathesh Sakthivel29-Jul-10 23:35 
AnswerRe: UpperBound of Dynamic array Pin
OriginalGriff29-Jul-10 23:43
mveOriginalGriff29-Jul-10 23:43 
GeneralRe: UpperBound of Dynamic array Pin
riced30-Jul-10 0:29
riced30-Jul-10 0:29 
GeneralRe: UpperBound of Dynamic array Pin
OriginalGriff30-Jul-10 0:33
mveOriginalGriff30-Jul-10 0:33 
GeneralRe: UpperBound of Dynamic array Pin
Keith Barrow30-Jul-10 0:49
professionalKeith Barrow30-Jul-10 0:49 
GeneralRe: UpperBound of Dynamic array Pin
Enobong Adahada2-Aug-10 8:11
Enobong Adahada2-Aug-10 8:11 
AnswerRe: UpperBound of Dynamic array Pin
PIEBALDconsult30-Jul-10 6:08
mvePIEBALDconsult30-Jul-10 6:08 
GeneralRe: UpperBound of Dynamic array Pin
riced30-Jul-10 6:11
riced30-Jul-10 6:11 
QuestionProblem updating data in an MSSQL database Pin
aneuby29-Jul-10 21:57
aneuby29-Jul-10 21:57 
Hi everyone,

I have the following issue. I use the following code to retrieve all data row from an mssql database and during the process I update some values.
The issue I have is that it only updates the first row in the database. All other rows which should be updated (field: WEB_OBEZ,...) are NULL.

Does someone have an idea or can explain why it only updates the first row ?

Thank you very much!

        private string FixOBez()
        {
            SqlConnection dbconn = new SqlConnection(this.sqlconn);

            try
            {
                dbconn.Open();

                SqlDataReader sqlreader = null;
                SqlCommand mycmd = new SqlCommand("SELECT * FROM dbo.testdata", dbconn);
                sqlreader = mycmd.ExecuteReader();

                // Wo kein leerzeichen ist muss eins eingefügt werden
                while (sqlreader.Read())
                {
                    string obez = sqlreader["O_BEZ"].ToString();
                    string okuerzel = sqlreader["O_KURZ"].ToString();

                    // Neue Bezeichnung holen
                    string[] lines = GetNewOBez(obez);


                    // Neue Bezeichnung schreiben
                    SqlCommand sql2 = new SqlCommand("UPDATE dbo.testdata SET WEB_OBEZ1 = '" + lines[0] + "',WEB_OBEZ2 = '" + lines[1] + "',WEB_OBEZ3 = '" + lines[2] + "' WHERE O_KURZ = '" + okuerzel + "'",dbconn);
                    sql2.ExecuteNonQuery();

                    return "OK";
                }

            }
            catch (Exception ex)
            {
                return ex.Message;
            }

            return "OK";
}


Bye,
ANeuby
AnswerRe: Problem updating data in an MSSQL database Pin
aneuby29-Jul-10 22:31
aneuby29-Jul-10 22:31 
QuestionBind Binary data to Gridview Pin
SatyaKeerthi1529-Jul-10 21:15
SatyaKeerthi1529-Jul-10 21:15 
AnswerRe: Bind Binary data to Gridview Pin
Arun Jacob29-Jul-10 21:28
Arun Jacob29-Jul-10 21:28 
GeneralRe: Bind Binary data to Gridview Pin
SatyaKeerthi1529-Jul-10 21:30
SatyaKeerthi1529-Jul-10 21:30 
GeneralRe: Bind Binary data to Gridview Pin
Mycroft Holmes29-Jul-10 22:14
professionalMycroft Holmes29-Jul-10 22:14 
GeneralRe: Bind Binary data to Gridview Pin
SatyaKeerthi1529-Jul-10 23:55
SatyaKeerthi1529-Jul-10 23:55 
QuestionPublishing Update problem Pin
kbalias29-Jul-10 19:40
kbalias29-Jul-10 19:40 
AnswerRe: Publishing Update problem Pin
Richard MacCutchan29-Jul-10 22:36
mveRichard MacCutchan29-Jul-10 22:36 
QuestionHow to add multiple components (texboxes,compoboxbutton etc...) to a listview Pin
aneesh kumar k29-Jul-10 18:32
aneesh kumar k29-Jul-10 18:32 

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.