Ask a Question related to ASP.NET General, Design and Development.
-
Ron #1
Checking for Empty Dataset -- Simple Question
Can anyone tell me how to check and see if a dataset is empty?
I am writing a search function that returns a dataset and binds it to a
datagrid. If no data is found, I would like to make the grid invisible and
have a label appear stating that no data was found.
Any suggestions?
Thanks,
Ron Rodenberg
Ron Guest
-
Need Simple Answer to Simple Contribute/Firefox question
Hello all; I've tried the Adobe help in CS3, tech support, phone support, this forum, other forums, Mozilla, and nowhere can I get a straight... -
Detailsview empty dataset insert
My details view is in insert mode and my dataset is empty but the details view doesnt show. who can help me, how to do? Also I tried to set... -
Error checking - Empty and Null and 0
Thanks this worked great... cfset math = Val(myvar) +1 -
checking the return value of member function with empty
I am having this rather annoying syntax problem. I have this.. if (!empty($this->GetParam('someparameter')) { // OK do something since the... -
dataset efficiency question
Hi, If you have a page that accesses a few db tables, and utilizes all, or most of the data in different ways at different times, do you think it... -
Steve C. Orr, MCSD #2
Re: Checking for Empty Dataset -- Simple Question
If MyDataSet.Tables.Count = 0 Then 'it's empty
--
I hope this helps,
Steve C. Orr, MCSD
[url]http://Steve.Orr.net[/url]
"Ron" <ron@razorvision.net> wrote in message
news:bekevp$1i5@library1.airnews.net...> Can anyone tell me how to check and see if a dataset is empty?
>
> I am writing a search function that returns a dataset and binds it to a
> datagrid. If no data is found, I would like to make the grid invisible and
> have a label appear stating that no data was found.
>
> Any suggestions?
>
> Thanks,
>
> Ron Rodenberg
>
>
Steve C. Orr, MCSD Guest
-
Ron #3
Re: Checking for Empty Dataset -- Simple Question
Thanks a lot Gaston, I appreciate your help.
"GastonQ" <gastonq_nospam@yahoo.com.ar> wrote in message
news:04ba01c3471c$dca7d9b0$a101280a@phx.gbl...> Hi Ron, to check an empty DataSet you must verify the Rows
> of the DataTable object that contains the database query
> result.
>
> For example:
> DataSet ds = new DataSet( "MyTable" );
> ...
> if( ds.Tables[ "MyTable" ].Rows.Count == 0 )
> // No records
> else
> // Do something...
>
> Regards
> Gaston Quirque
> Microsoft MVP
>> empty?> >-----Original Message-----
> >Can anyone tell me how to check and see if a dataset is> binds it to a> >
> >I am writing a search function that returns a dataset and> grid invisible and> >datagrid. If no data is found, I would like to make the> >have a label appear stating that no data was found.
> >
> >Any suggestions?
> >
> >Thanks,
> >
> >Ron Rodenberg
> >
> >
> >.
> >
Ron Guest



Reply With Quote

