I am trying to create a new table in a database which has a name of checkout and a check number which ive put in {0}. But when I run the program it comes up with the error shown
You're calling string.Format including {0} in various places, indicating that you want a placeholder to be replaced... but you're not providing the placeholder value.
You want something like:
tableCreateCommand.CommandText = string.Format("...", checkNumber);
However, I suspect you actually want multiple parameters ({0}, {1}, {2} etc) rather than just one. What SQL are you expecting from the result of string.Format?