Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I am filling a datatable from a database and I have a couple of questions:

 

1) If the dataadpter returns zero records, will it still create a datatable in the dataset and just leave it empty?

 

2) If it does not create a table how could I verify that the datatable exists in an if statement?

 

3) How can I verify if a datatable contains at least one record in an if statement?

 

Chester

____________________________________________

http://www.pophamcafe.com

I am starting a developers section, more tutorials than anything.

Posted
I am filling a datatable from a database and I have a couple of questions:

 

1) If the dataadpter returns zero records, will it still create a datatable in the dataset and just leave it empty?

 

Yes

 

2) If it does not create a table how could I verify that the datatable exists in an if statement?

Not an issue - it does create it.

 

3) How can I verify if a datatable contains at least one record in an if statement?

 

Chester

 

If dt.Rows.Count > 0 Then

' your code here

End If

Posted

Yeah, I figured it out. I am switching back and forth between vb .net programming and access vba programming and going to school full time so my mind does not always remember things the way that it should. Thanks for the help :)

 

Chester

____________________________________________

http://www.pophamcafe.com

I am starting a developers section, more tutorials than anything.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...