Click here to Skip to main content
15,893,190 members
Home / Discussions / C#
   

C#

 
AnswerRe: What is Constructor Overloading in C# .net ? Pin
David A. Gray3-May-15 10:19
David A. Gray3-May-15 10:19 
QuestionVideo cutter / merger in C# winfrom Pin
Member 1162007426-Apr-15 7:35
Member 1162007426-Apr-15 7:35 
GeneralRe: Video cutter / merger in C# winfrom Pin
Sascha Lefèvre26-Apr-15 7:46
professionalSascha Lefèvre26-Apr-15 7:46 
QuestionSql Dependency onchange event not firing every time c# Pin
Tridip Bhattacharjee25-Apr-15 9:56
professionalTridip Bhattacharjee25-Apr-15 9:56 
AnswerRe: Sql Dependency onchange event not firing every time c# Pin
Dave Kreskowiak25-Apr-15 10:55
mveDave Kreskowiak25-Apr-15 10:55 
Questionc# opening database to array Pin
ruspj25-Apr-15 8:03
ruspj25-Apr-15 8:03 
AnswerRe: c# opening database to array Pin
Sascha Lefèvre25-Apr-15 8:16
professionalSascha Lefèvre25-Apr-15 8:16 
GeneralRe: c# opening database to array Pin
ruspj25-Apr-15 8:31
ruspj25-Apr-15 8:31 
thanks for the quick reply
have tried removing the while (reader.Read()) {rows++;}; line and setting to read just a few lines by changing the rows by int rows = 3; as wasnt sure if it was interfering with reading the database.
was still getting the same error
prety new at c# & so was storing in an array as used them before
not used list yet & no idea how to create a class with columns as properties

using this still has the same error with not reading

static void displayinarray()
{
    int rows = 3;
    int averagewins;
    //in global     static OleDbConnection connection;
    //in main       connection = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=F:\\connected\\users.accdb");
    try
    {
        OleDbCommand command = new OleDbCommand("select * from users", connection);
        connection.Open();
        OleDbDataReader reader = command.ExecuteReader();
        //while (reader.Read()) {rows++;};
        string[,] results = new string[6,rows];
        for (int loop = 0; (reader.Read()); loop++)
        {
            results[0,loop] = reader.GetString(0);
            results[1,loop] = reader.GetString(1);
            results[2,loop] = reader.GetString(2);
            results[3,loop] = reader.GetInt32(3).ToString();
            results[4,loop] = reader.GetInt32(4).ToString();
            averagewins = (reader.GetInt32(4) + reader.GetInt32(3))*100;
            results[5,loop] = Convert.ToString(averagewins);
        }


modified 25-Apr-15 14:40pm.

GeneralRe: c# opening database to array Pin
Sascha Lefèvre25-Apr-15 8:50
professionalSascha Lefèvre25-Apr-15 8:50 
GeneralSharpDevolp 4.3 Pin
Member 465445225-Apr-15 3:41
Member 465445225-Apr-15 3:41 
GeneralRe: SharpDevolp 4.3 Pin
Eddy Vluggen25-Apr-15 7:32
professionalEddy Vluggen25-Apr-15 7:32 
QuestionRegistering SQL Dependency again from onchange event Pin
Tridip Bhattacharjee24-Apr-15 4:48
professionalTridip Bhattacharjee24-Apr-15 4:48 
QuestionSql Dependency onchange event not firing every time c# Pin
Tridip Bhattacharjee24-Apr-15 3:48
professionalTridip Bhattacharjee24-Apr-15 3:48 
QuestionUnable to connect Oracle database from C# Pin
meeram3924-Apr-15 3:47
professionalmeeram3924-Apr-15 3:47 
AnswerRe: Unable to connect Oracle database from C# Pin
Dave Kreskowiak24-Apr-15 4:03
mveDave Kreskowiak24-Apr-15 4:03 
GeneralRe: Unable to connect Oracle database from C# Pin
meeram3924-Apr-15 14:53
professionalmeeram3924-Apr-15 14:53 
GeneralRe: Unable to connect Oracle database from C# Pin
Dave Kreskowiak24-Apr-15 17:21
mveDave Kreskowiak24-Apr-15 17:21 
GeneralRe: Unable to connect Oracle database from C# Pin
meeram3924-Apr-15 19:28
professionalmeeram3924-Apr-15 19:28 
GeneralRe: Unable to connect Oracle database from C# Pin
meeram3925-Apr-15 0:39
professionalmeeram3925-Apr-15 0:39 
GeneralRe: Unable to connect Oracle database from C# Pin
Dave Kreskowiak25-Apr-15 3:42
mveDave Kreskowiak25-Apr-15 3:42 
GeneralRe: Unable to connect Oracle database from C# Pin
meeram3925-Apr-15 5:46
professionalmeeram3925-Apr-15 5:46 
QuestionHow to Open the Docx File in Silverlight Pin
Hrishikesh Shivacharan24-Apr-15 1:17
Hrishikesh Shivacharan24-Apr-15 1:17 
AnswerRe: How to Open the Docx File in Silverlight Pin
Dave Kreskowiak24-Apr-15 3:37
mveDave Kreskowiak24-Apr-15 3:37 
AnswerRe: How to Open the Docx File in Silverlight Pin
Brisingr Aerowing24-Apr-15 6:31
professionalBrisingr Aerowing24-Apr-15 6:31 
AnswerRe: How to Open the Docx File in Silverlight Pin
Mycroft Holmes24-Apr-15 13:35
professionalMycroft Holmes24-Apr-15 13:35 

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.