DataTable or DataSet? OleDB or Sql..?

  • Thread starter Thread starter Lasse Edsvik
  • Start date Start date
L

Lasse Edsvik

Hello

I was wondering if you guys could help me out...... I might have mixed the
things up so bare with me.

I was wondering if I should use datatable or dataset when displaying data in
my asp.net page? Mostly i dont need paging, just showing data...... and does
both support paging in the datagrid control if i need it?

and which one is faster? I "always" use stored procedures for select,
insert, update, delete........ so I basically just send parameters to them
and let sql-server do the work, and not having some thing i modify before i
send the result to sql-server. (hope i explained correct there).

And second....... Should I use OleDB Provider or "regular" Sql-"class" (?)
to connect and execute things against my sql 2000 server? I've always used
OleDB provider when working with regular asp. Any pros/cons?

TIA
/Lasse
 
If you are using SQL Server, I would recommend using sqlClient and not OleDb.
Whenever you are using SQL Server you should use sqlClient, as it is
specially optimized for SQL Server database.

Regarding the data binding to the DataGrid, Are you planning to sort the
grid later based on columns etc...I really don't have any personal choice but
most of the time I am using DataTable. In a dataset you have either a single
data table or a collection of tables, so in a way you are joining the
DataTable. You can also create a DataView from the DataTable.

Thanks,

Tapasvi Mehta
MCSD For .NET
Sr. Program Analyst/Architect
routeservices.com
 
The only reason you would want to use OleDB is if you think there is a very
good chance you would have to use a non-SQL Server database in the future.
 
Back
Top