The object has not been initialized before use.
At the top of your code file type:
Option Strict On
Option Explicit On
sef,
If the problem is with Database return results, I presume it is in this scenario:
dsData = getSQLData(conn,sql, blah,blah….)
dt = dsData.Tables(0) ‘Perhaps the obj ref not set is occurring here
To fix that:
dsData = getSQLData(conn,sql, blah,blah….)
If dsData.Tables.Count = 0 Then Exit Sub
dt = dsData.Tables(0) ‘Perhaps the obj ref not set is occurring here
edit: added code formatting tags …