The cause of this error may be that you have declared a dataset but have not written the following statement
VB.NET
ds= new DataSet()
C#
ds= new DataSet();