Hi,
"UJ" <fr**@nowhere.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
I'm getting a dataset back from a web service and I want to verify that
the table I want exists before trying to access it (which will cause an
exception.) Is there an easy way to check for a specific table in my
dataset without doing a try/catch or is that the easiest way?
if ( dataSet.Tables["MyTable"] == null )
throw new exception("Table no present");
in other words, just check for null when you refer to the table, the same
apply to columns
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation