Page 1 of 1

mySql Records Count Help

Posted: Fri Oct 06, 2006 8:25 pm
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....

Posted: Sat Oct 07, 2006 6:07 am
by volka
Have you checked all references != null?
Me.dst != null
me.dst.Tables("Programas") != null
Me.dst.Tables("Programas").Rows != null