473,326 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Running a query

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
Aug 15 '08 #1
2 828

"John" <in**@nospam.infovis.co.ukwrote in message
news:eC**************@TK2MSFTNGP05.phx.gbl...
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.

Aug 15 '08 #2
On Aug 14, 10:37*pm, "John" <i...@nospam.infovis.co.ukwrote:
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/
Aug 15 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Gary | last post by:
I am having a problem executing long running queries from an ASP application which connects to SQL Server 2000. Basically, I have batches of queries that are run using ADO in a loop written in...
1
by: u473 | last post by:
I am scratching my head with the required quotes and parentheses. I started with an existing working Query with Running Total by date. Now I need to produce a running total by quarter day, so I...
4
by: Kory | last post by:
How do you stop a long running query with a SQLConnection or SQLCommand? Calling Close on either just waits until the query is done. Is there a way to stop it? The following on a long query ...
6
by: johntarr | last post by:
I hope I am not asking about something that has been done before, but I have searched and cannot find an answer. What I am trying to do is to run a query, and then perform some logic on the...
1
by: Aaron West | last post by:
Try this script to see what queries are taking over a second. To get some real output, you need a long-running query. Here's one (estimated to take over an hour): PRINT GETDATE() select...
0
by: murat-mur | last post by:
Hi all, Environment: My PC: MS Windows 2000 pro, DB2 Connect Client 7.1 Gateway: MS Windows 2000 server. DB2 Connect EE. DB2 z/OS V7.1 z/OS 1.6 php 5.1.2 is running on my PC. the below...
3
by: mochatrpl | last post by:
I am looking for a way to make a query / report display the running average for total dollars. I have already set up a query to provide totals dollars per day from which a report graphly shows...
3
by: Phil Stanton | last post by:
I have a number of queries which use code for the output of 1 or more fields. For example Address:GetAddress(AddressID, True, 60) Address ID Points to an Address in a table - Address Line1, Line...
9
by: JJM0926 | last post by:
I'm trying to create a running totals query in access 97. I have followed the directions on how to do it from Microsofts website article id 138911. I took their code they had and replaced it with...
7
by: Lewe22 | last post by:
I have a query pulling information from multiple tables, one of which contains a list of students with an auto number their assessment information and how long the assessment took in minutes . ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.