Hi,
I don't under what I'm doing wrong. In my line of code I have 2 outputs: The first outout returns a value, however, when I try to output the second ConsoleLine I get a value of "0"??
I'm thinking it has something to do with Converting a string to int? Any Ideas?
OleDbCommand myOleDbCommand_MemCount = myOleDbConnection.CreateCommand();
myOleDbCommand_MemCount.CommandText = "Select COUNT(emp) FROM temp_table)";
OleDbDataReader myOleDbDataReader_MemCount = myOleDbCommand_MemCount.ExecuteReader();
myOleDbDataReader_MemCount.Read();
Console.WriteLine("Number of Members: " + myOleDbDataReader_MemCount["COUNT(emp)"]);
int Count = myOleDbDataReader_MemCount.GetOrdinal("COUNT(emp)");
Console.WriteLine(Count);
myOleDbDataReader_MemCount.Close();