Protected Function ExecuteDQL(ByVal Query As String) As DataSet DS = New DataSet DBCom = DBCon.CreateCommand() DBAdp = New SqlDataAdapter Try DBCom.CommandText = Query DBCom.Connection = DBCon DBAdp.SelectCommand = DBCom DBAdp.Fill(DS) If DS.Tables(0).Rows.Count >= 1 Then Return DS Else Return Nothing End If Catch ex As Exception MsgBox(ex.Message) Return Nothing Finally CloseDB() End Try End Function
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)