473,396 Members | 2,102 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,396 software developers and data experts.

Retrieve result from SqlCommand

Dear developer,

I'm developing a web service with VS .NET and using C#. And part of the
webservice is to get data from database (by using SELECT), however, the
result from the sql query i cannot parse it to string, how can i get the
result from the SqlCommand..? dataset or datareader..?.

pls advice & thanks a lot.
cheers,
Wong CS
Nov 19 '05 #1
1 889
Hi CS,

What you need is ADO.NET knowledge. Please go to following
URL to take look:

http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/cpguide/html/cpconoverviewofadonet.asp
HTH

Elton Wang
el********@hotmail.com
-----Original Message-----
Dear developer,

I'm developing a web service with VS .NET and using C#. And part of thewebservice is to get data from database (by using SELECT), however, theresult from the sql query i cannot parse it to string, how can i get theresult from the SqlCommand..? dataset or datareader..?.

pls advice & thanks a lot.
cheers,
Wong CS
.

Nov 19 '05 #2

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

Similar topics

3
by: John Francisco Williams | last post by:
Hi, I searched through this newsgroup looking for an answer for this, but didn't find any (it probably is here. Just didn't find it). I am trying to retrieve information from two related tables,...
2
by: Dmitri Khanine | last post by:
Hi All Trying to retrieve the value of the Sqlcommand' parameter as integer. Here is how I declare it: SqlParameter paramId = command.Parameters.Add("@id", SqlDbType.Int); paramId.Direction...
1
by: Soren Jorgensen | last post by:
Hi, When executing following statement "select distinct Name from CustomerParameters for xml auto" - XmlReader reads "<customerparameters name="Www.Mail.Generel" />" - but SQL Query Manager...
1
by: JKM | last post by:
I'm a newbie to VB.NET and ASP.NET (as you'll see by my code). However, I'm not able to get a simple process to work. I'm trying to retrieve a record and then check to see if the 'accountstat'...
1
by: Wong CS | last post by:
Dear developer, I'm developing a web service with VS .NET and using C#. And part of the webservice is to get data from database (by using SELECT), however, the result from the sql query i cannot...
3
by: Manfred | last post by:
Hi all How can I display the result of a sqlcommand select in a datagridview. I guess need a dataset as result to connet it as datasource to the datagrid? Thanks in advance
5
by: Ken | last post by:
I'm trying to run a loop to capture column property information from a table in my datasource. Can anybody see where this is going wrong? Dim tbl As New DataTable Dim col As DataColumn Dim x...
8
by: rempit | last post by:
Hye all..I'm Newbie.. I'm using asp.net..This code below I put in .aspx file..And become like that.. I want to make something like "WHEN USER PUT SOMETHING IN TEXTBOX AND CLICK THE BUTTON...
1
by: terminul | last post by:
Hi I have a datalist which loops through the categories and within the datalist I have a CheckBoxList which are bound on the DataList's OnItemDataBound. The only problem I have is retrieving...
4
by: =?Utf-8?B?VG9kZCBKYXNwZXJz?= | last post by:
Here is what I have: private int NationalCount() { Int32 numRecords = 0; using (SqlConnection dataConnection = new SqlConnection(GlobalVars.sqlConnString)) { SqlCommand dataCommand = new...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.