I have a datatable like this:

```
REFERENCE   DESCRIPTION
AAAA1       AAAA1 DESCRIPTION
AAAA2       AAAA2 DESCRIPTION
AAAA3       AAAA3 DESCRIPTION
AAAA4       AAAA4 DESCRIPTION

```

If I make the selection like this it works fine.

```
DataRow[] row = table.Select("REFERENCE = 'AAAA1'");

```

but if I do it like this:

```
string reference = tbRef.Text;
DataRow[] row = table.Select("REFERENCE = '{0}'", reference);

```

I get an exception: **System.IndexOutOfRangeException**