Click here to Skip to main content
15,907,874 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# class constructor best practice ? Pin
PIEBALDconsult4-Apr-15 8:27
mvePIEBALDconsult4-Apr-15 8:27 
AnswerRe: C# class constructor best practice ? Pin
Eddy Vluggen4-Apr-15 6:47
professionalEddy Vluggen4-Apr-15 6:47 
GeneralRe: C# class constructor best practice ? Pin
BillWoodruff4-Apr-15 8:28
professionalBillWoodruff4-Apr-15 8:28 
GeneralRe: C# class constructor best practice ? Pin
PIEBALDconsult4-Apr-15 8:50
mvePIEBALDconsult4-Apr-15 8:50 
GeneralRe: C# class constructor best practice ? Pin
Eddy Vluggen4-Apr-15 11:13
professionalEddy Vluggen4-Apr-15 11:13 
GeneralRe: C# class constructor best practice ? Pin
BillWoodruff4-Apr-15 21:42
professionalBillWoodruff4-Apr-15 21:42 
GeneralRe: C# class constructor best practice ? Pin
Eddy Vluggen5-Apr-15 13:13
professionalEddy Vluggen5-Apr-15 13:13 
QuestionIs there any solution to design report instead of Crystal? Pin
aahamdan4-Apr-15 4:14
aahamdan4-Apr-15 4:14 
AnswerRe: Is there any solution to design report instead of Crystal? Pin
OriginalGriff4-Apr-15 4:44
mveOriginalGriff4-Apr-15 4:44 
AnswerRe: Is there any solution to design report instead of Crystal? Pin
tecnova14-Apr-15 4:58
professionaltecnova14-Apr-15 4:58 
GeneralRe: Is there any solution to design report instead of Crystal? Pin
aahamdan4-Apr-15 10:14
aahamdan4-Apr-15 10:14 
GeneralRe: Is there any solution to design report instead of Crystal? Pin
tecnova18-Apr-15 14:54
professionaltecnova18-Apr-15 14:54 
AnswerRe: Is there any solution to design report instead of Crystal? Pin
Eddy Vluggen4-Apr-15 6:50
professionalEddy Vluggen4-Apr-15 6:50 
GeneralRe: Is there any solution to design report instead of Crystal? Pin
Mycroft Holmes5-Apr-15 14:35
professionalMycroft Holmes5-Apr-15 14:35 
GeneralRe: Is there any solution to design report instead of Crystal? Pin
Eddy Vluggen6-Apr-15 0:33
professionalEddy Vluggen6-Apr-15 0:33 
QuestionBest way to Sync data Pin
Jassim Rahma3-Apr-15 11:55
Jassim Rahma3-Apr-15 11:55 
AnswerRe: Best way to Sync data Pin
Afzaal Ahmad Zeeshan3-Apr-15 16:13
professionalAfzaal Ahmad Zeeshan3-Apr-15 16:13 
Questioncomparing the columns of two tables Pin
Member 107105323-Apr-15 2:49
Member 107105323-Apr-15 2:49 
AnswerRe: comparing the columns of two tables Pin
Peter Leow3-Apr-15 3:01
professionalPeter Leow3-Apr-15 3:01 
GeneralRe: comparing the columns of two tables Pin
Member 107105323-Apr-15 3:22
Member 107105323-Apr-15 3:22 
Questionerror ExecuteReader() Pin
Member 107105323-Apr-15 1:03
Member 107105323-Apr-15 1:03 
Can you please tell how to fix the error.The debugger gives an error in the string: "SqlDataReader dr = com.ExecuteReader();".
writes:"There is a designated team of Command open DataReader, which requires the prior close."
Help me please.
C#
class DAL
    {
        string connectionString = @"Data Source=...";
        public ArrayList GetNumber()
        {
            ArrayList getNum = new ArrayList();
            SqlConnection con = new SqlConnection(connectionString);
            SqlCommand com = new SqlCommand("SELECT * FROM Graphik", con);
            con.Open();
            com.ExecuteReader();
            SqlDataReader dr = com.ExecuteReader();
            if (dr.HasRows)
            {
                foreach (DbDataRecord result in dr)
                    getNum.Add(result);
            }
            con.Close();
            return getNum;
        }
    }

AnswerRe: error ExecuteReader() Pin
Eddy Vluggen3-Apr-15 1:11
professionalEddy Vluggen3-Apr-15 1:11 
GeneralRe: error ExecuteReader() Pin
Member 107105323-Apr-15 1:57
Member 107105323-Apr-15 1:57 
AnswerRe: error ExecuteReader() Pin
Sascha Lefèvre3-Apr-15 1:19
professionalSascha Lefèvre3-Apr-15 1:19 
GeneralRe: error ExecuteReader() Pin
Member 107105323-Apr-15 2:03
Member 107105323-Apr-15 2:03 

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.