Im still confused a little. I tried the below but it Doesn't work. It is
probably easy for one of you masters of .Net on here. 


        'Create a DataSet ----------------------------------------
        Dim objDataSet As New DataSet
        'Create a DataSet ----------------------------------------

        'Create a DataAdapter ------------------------------------
        Dim objDataAdapter As SqlDataAdapter
        objDataAdapter = New SqlDataAdapter(strSQLstring, objConn)
        objDataAdapter.Fill(objDataSet, "users")
        'Create a DataAdapter ------------------------------------

        If Not objDataSet.Tables.Count = 0 Then
            Session("SQLstring") = strSQLstring

        Else
            Session("SQLstring") = "NoRecords"

        End If



I just need to see if any records are returned by the sql statement so I
know if there are any to view. I tried with t his line but its not working.


If Not objDataSet.Tables.Count = 0 Then







-----Original Message-----
From: Charles Carroll [mailto:[EMAIL PROTECTED] 
Sent: Sunday, April 03, 2005 9:32 PM
To: [email protected]
Subject: Re: [AspNetAnyQuestionIsOk] CHecking if a returned dataset or table
is null


typename is your friend

trace.warn("typename of objDataSet",typename(objDataSet))

great tool to find out what unitialized/ull/etc. objects are in the
framework


On Apr 3, 2005 9:23 PM, Mike Belcher
<[EMAIL PROTECTED]> wrote:
>          'Create a DataSet
> ----------------------------------------
>          Dim objDataSet As New DataSet
>          'Create a DataSet
> ----------------------------------------
>  
>          'Create a DataAdapter
> ------------------------------------
>          Dim objDataAdapter As SqlDataAdapter
>          objDataAdapter = New SqlDataAdapter(strSQLstring, objConn)
>          objDataAdapter.Fill(objDataSet, "users")
>  
>  
>  
>  How can I check to see if the objDataSet or the table   users is empty?
>  
>  
>  
>  ________________________________
>  Yahoo! Groups Links
>  
>  
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
>   
> To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
>   
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


 
Yahoo! Groups Links



 







 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to