How to fix the errors

BenTam-3003 686 Reputation points
2022-02-04T14:43:41.487+00:00

Dear All,

In the following screen capture, the error is "Too many characters in charater literal". I have the following questions.

  • Why in dataadapter.Fill(ds1, "Student_table") uses double quote, and in the statement M_Name = ds1.Tables['Student_table'].Rows[0][Name]; uses single quotes.
  • How to fix the errors?

171398-error.gif

Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
{count} votes

Answer accepted by question author
  1. P a u l 10,761 Reputation points
    2022-02-04T14:49:59.97+00:00

    Single quotes are for single characters which are of type char, whereas double quotes represent a string of characters of type string. The way to fix this is to change those single quotes to double quotes.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.