Michel,
I think you mean "if loData is a Dataset"....loDT is your data adapter.
If the query returns no records, you can probably determine that by checking for the table count or row count of loData (depending on how many tables were in your result set) example... if (MyDataSet.Tables.Count>0)...or if(MyDataSet.Tables[0].Rows.Count > 0)
Not to judge naming conventions, but I would probably change your variable name for the adapter to loDA...using 'dt' might make another programmer believe it's referring to a datatable.
Kevin