c# - Data table returning "no row at position 0”

I’m doing validation in my code by comparing the actual value with expected – pulled from the data table (ExecuteReader()) using sql select statement.

I have this logic in multiple place in my test cases. It works only the first time and for the consecutive test cases it throws an error

“There is no row at position 0”.

The same code works in debug mode and I thought initializing the variable would fix this but it did not .

Not sure what else is happening here.

String  ticketPrice = "";
ticketPrice = db.RunQuery(@"select ticketPrice from <tablename>  
          where CustomerId = '"+uniqueId+"';").Rows[0]["ticketPrice"].ToString();

  public DataTable RunQuery(string SQL)

     SqlConnection connection = new SqlConnection(connectionString);
     SqlDataReader reader = null;
     DataTable dt = new DataTable();
        SqlCommand command = connection.CreateCommand();command.CommandText = SQL;
        reader = command.ExecuteReader();

        //load the mysql reader into a databable - this allows the connection to the db to be closed while still
        //having access to the data that the query returned

     catch(Exception e)
        Console.WriteLine("Exception is MSSQLConnector::RunQuery - " + e.ToString());
     return dt ;