To executing a query we need to declare a Command

var command = new Command();
var strSelect = "Select * FROM Categories";
command.CommandText = strSelect;

return (DataTable)command.ExecuteQuery(ReturnType.DataTable);

Or we can pass our query to ExecuteQuery method, like that:

var command = new Command();
var strSelect = "Select * FROM Categories";
return (DataTable)command.ExecuteQuery(strSelect, ReturnType.DataTable);

Having fun!

Last edited Feb 10, 2009 at 10:10 AM by LucianoLima, version 2

Comments

No comments yet.