Tuesday, June 28, 2011

Learning about SQL

There are more than one way to do queries in SQL in .NET. I'm summarizing them here for my own use:

  • SqlReader - reads one line of a table at a time, after a SELECT statement is made
  • SqlDataAdapter -still learning about this. appears to be a magic box where things just happen.
  • Linq - DataContext - uses high level LINQ statements to do the query. Has the advantage of mostly keeping things tightly typed. Has the disadvantage that it doesn't do generic SQL commands (like add a new column to a table).

No comments: