Running a query

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

I have connection to a database. What is an easy way to run a select sql
that returns multiple columns on the database? For instance can I use LINQ?

Many Thanks

Regards
 
John said:
Hi

I have connection to a database. What is an easy way to run a select sql
that returns multiple columns on the database? For instance can I use
LINQ?

Many Thanks

By using an ADO.Net SQL Command Object using a Select statement is the
easiest way to return a row from table that has multiple columns of row data
returned from the Select.
 
Hi

I have connection to a database. What is an easy way to run a select sql
that returns multiple columns on the database? For instance can I use LINQ?

Many Thanks

Regards

Yes. As 'Mr. Arnold' explains, this is plain old ADO.NET stuff. After
you have an open DbConnection object, simply create a DbCommand object
and specify your SQL statement using inline SQL or if available to
your database, a stored procedure.

Thanks,

Seth Rowe [MVP]
http://sethrowe.blogspot.com/
 
Back
Top