-4

I came across the following error, can anyone help me ?

enter image description here

Franckentien
  • 324
  • 6
  • 21

1 Answers1

0

Other than what being commented is right absolutely that in your query you are missing the end ) the below line is totally wrong in your code. It just should be cmd.ExecuteReader() since ExecuteReader() returns a reader object which you need to iterate through to get all the data.

SqlDataReader registro = new cmd.ExecuteReader();
Rahul
  • 76,197
  • 13
  • 71
  • 125