Click here to Skip to main content
15,881,248 members
Home / Discussions / C#
   

C#

 
GeneralRe: Conditional Compiler Symbols Pin
Kevin Marois22-Feb-22 12:25
professionalKevin Marois22-Feb-22 12:25 
GeneralRe: Conditional Compiler Symbols Pin
trønderen22-Feb-22 15:03
trønderen22-Feb-22 15:03 
GeneralRe: Conditional Compiler Symbols Pin
OriginalGriff22-Feb-22 20:11
mveOriginalGriff22-Feb-22 20:11 
Questionwhat is the right place to await Task.WhenAll Pin
Kumara Prathipati 202119-Feb-22 15:04
Kumara Prathipati 202119-Feb-22 15:04 
AnswerRe: what is the right place to await Task.WhenAll Pin
Richard Deeming24-Feb-22 0:24
mveRichard Deeming24-Feb-22 0:24 
QuestionVisual Studio 2022 Dark Image In Panel Pin
GP66612-Feb-22 7:37
GP66612-Feb-22 7:37 
QuestionRe: Visual Studio 2022 Dark Image In Panel Pin
Eddy Vluggen12-Feb-22 10:45
professionalEddy Vluggen12-Feb-22 10:45 
QuestionSyntax error: Missing operand after 'Percent' operator. Pin
Richard A Knox11-Feb-22 10:46
Richard A Knox11-Feb-22 10:46 
Good afternoon,

I am not sure what the issue is, I have written this piece of code, rewritten it and looked up on the net at various sites for guidance and not sure what is wrong with it.
I am taking a table from a database and placing it in memory, which works fine. But, now I am attempting to read the 40Percent field column searching to find the row thats just less than a certain value, but getting an error.

public DataSet ExecuteQuery()
      {
          // construct an empty result database to return

          DataTable table = ds.Tables["Fill_Data"];
          //DataTable table = ds.Tables[0];
          // Presuming the DataTable has a column named Date.
          string expression;
         //expression = "40Percent <" + lblTA.Text.ToString();
         expression = "40Percent = 0.355";

          DataRow[] foundRows;

         // Use the Select method to find all rows matching the filter.
         foundRows = table.Select(expression);

         // Print column 0 of each returned row.
         for (int i = 0; i < foundRows.Length; i++)
         {
             Console.WriteLine(foundRows[i][0]);
         }

         return ds;
      }

[Image of error message]
Richard
Disable Vet
Grandfather
Pain in the @ss

AnswerRe: Syntax error: Missing operand after 'Percent' operator. Pin
Mycroft Holmes11-Feb-22 11:05
professionalMycroft Holmes11-Feb-22 11:05 
GeneralRe: Syntax error: Missing operand after 'Percent' operator. Pin
Richard A Knox12-Feb-22 2:08
Richard A Knox12-Feb-22 2:08 
GeneralRe: Syntax error: Missing operand after 'Percent' operator. Pin
Mycroft Holmes12-Feb-22 11:16
professionalMycroft Holmes12-Feb-22 11:16 
AnswerRe: Syntax error: Missing operand after 'Percent' operator. Pin
Kelly Herald11-Feb-22 11:46
Kelly Herald11-Feb-22 11:46 
GeneralRe: Syntax error: Missing operand after 'Percent' operator. Pin
Richard A Knox12-Feb-22 2:01
Richard A Knox12-Feb-22 2:01 
QuestionRe: Syntax error: Missing operand after 'Percent' operator. Pin
Eddy Vluggen11-Feb-22 12:35
professionalEddy Vluggen11-Feb-22 12:35 
AnswerRe: Syntax error: Missing operand after 'Percent' operator. Pin
OriginalGriff11-Feb-22 19:22
mveOriginalGriff11-Feb-22 19:22 
GeneralRe: Syntax error: Missing operand after 'Percent' operator. Pin
Richard A Knox12-Feb-22 2:04
Richard A Knox12-Feb-22 2:04 
GeneralRe: Syntax error: Missing operand after 'Percent' operator. Pin
OriginalGriff12-Feb-22 2:18
mveOriginalGriff12-Feb-22 2:18 
AnswerRe: Syntax error: Missing operand after 'Percent' operator. Pin
jsc4215-Feb-22 5:48
professionaljsc4215-Feb-22 5:48 
QuestionI can not see inside my phone directory branch when I plug it into my PC Pin
_Q12_9-Feb-22 22:51
_Q12_9-Feb-22 22:51 
AnswerRe: I can not see inside my phone directory branch when I plug it into my PC Pin
OriginalGriff9-Feb-22 23:09
mveOriginalGriff9-Feb-22 23:09 
GeneralRe: I can not see inside my phone directory branch when I plug it into my PC Pin
_Q12_9-Feb-22 23:33
_Q12_9-Feb-22 23:33 
GeneralRe: I can not see inside my phone directory branch when I plug it into my PC Pin
OriginalGriff10-Feb-22 0:14
mveOriginalGriff10-Feb-22 0:14 
GeneralMessage Closed Pin
10-Feb-22 0:39
_Q12_10-Feb-22 0:39 
GeneralMessage Closed Pin
10-Feb-22 0:52
_Q12_10-Feb-22 0:52 
GeneralMessage Closed Pin
10-Feb-22 0:55
_Q12_10-Feb-22 0:55 

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.