As others have noted, there is no "datasetname" property.
However, there are two situations that you need to be ready for.
1) The query returns no rows. In this case you'll get a new DataTable but
the Rows.Count property will be 0.
2) The query returns no rowset. If you execute an action query or the SP
executes logic that bypasses the SELECT, you will get a resultset, but no
rowset. In this case the DataTable will not be created at all.
hth
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
www.sqlreportingservices.net
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
"phlakie" <(E-Mail Removed)> wrote in message
news

A103219-E87A-47AD-BFF6-(E-Mail Removed)...
> Excerpt from Code:
>
> dim ds as new dataset
>
> ds= execute("Stored_Proc")
> dim name as string= ds.tables(0).datasetname
>
> execute is a function that executes the stored procedure Stored_Proc.
>
> Suppose execute returns an empty dataset, what kind of exception is
> raised?
>