Public Function ExecuteQuery(ByVal Query As String) As DataTable If Not openconn() Then MsgBox("Koneksi gagal...!", MsgBoxStyle.Critical, "Access Failed") Return Nothing Exit Function End If Cmd = New OleDb.OleDbCommand(Query, Cn) Da = New OleDb.OleDbDataAdapter Da.SelectCommand = Cmd Ds = New Data.DataSet Da.Fill (Ds) Dt = Ds.Tables(0) Return Dt Dt = Nothing Ds = Nothing Da = Nothing Cmd = Nothing closeconn() End Function
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)