mySql Records Count Help

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
jeva39
Forum Commoner
Posts: 45
Joined: Sun Aug 27, 2006 11:45 pm
Location: Panamá

mySql Records Count Help

Post by jeva39 »

In an VB.NET 2005 APP I use this line:

Code: Select all

If Me.dst.Tables("Programas").Rows.Count <= 0 Then
..........code...............
else
...........code..............
End If
DST is the declared DataSet. I use this line when the user access the App to determine if is a New record in the DB or the DB have records created.

I try to use similar code with mySql (mySql - Connector) in an test APP with VB.NET 2005 but I receive this error:

Object Reference not set to an instance of an object

What I can do?

Thanks....
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Have you checked all references != null?
Me.dst != null
me.dst.Tables("Programas") != null
Me.dst.Tables("Programas").Rows != null
Post Reply