Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 5th, 2005, 03:55 AM
Registered User
 
Join Date: Jul 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rhythm
Default Need Help on Retriving the value of single field

Hello there
I am a begining asp.net programmer. what i what to know is that how can i retrive the value of single filed from database in asp.ner..

Hope to will get the solution faster.

Thanks

 
Old July 5th, 2005, 09:49 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You need to use a database connection object of the correct flavor for your database (such as SqlConnection), then the right flavor command object (such as SqlCommand) so you can construct the actually query to run. You can call <commandObject>.ExecuteScalar() to retrieve the first column of the first row returned by the query.

-Peter
 
Old July 6th, 2005, 12:57 AM
Registered User
 
Join Date: Jul 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rhythm
Default

Thanks Peter.
Your Solution Worked.







Similar Threads
Thread Thread Starter Forum Replies Last Post
edit single field stealthdevil Access VBA 3 November 16th, 2006 01:19 PM
ASP.Net Single Single-on with Oracle Application S guhanath Oracle 0 October 6th, 2004 05:05 AM
Relating 2 Tables be search for single field value bsimecek SQL Language 4 October 4th, 2004 09:24 AM
Storing complete table rows in a single field KenNeedham Oracle 2 January 22nd, 2004 01:45 PM
Showing single and double quote in text field. ggriffit SQL Server ASP 4 January 5th, 2004 11:19 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.