SyntaxFix
Write A Post
Hire A Developer
Questions
Your second String.Format uses {2} as a placeholder but you're only passing in one argument, so you should use {0} instead.
String.Format
{2}
{0}
Change this:
String.Format("{2}", reader.GetString(0));
To this:
String.Format("{0}", reader.GetString(2));