How to get Field Values and Names from a database using ASP.NET

I know that with ASP I can loop through a Recordset object to get the NAME of the fields and the values of those fields:

For Each objField in objRecordset.Fields
Response.Write objField.Name
Response.Write objField.Value

Is this possible in ASP.NET?

Ariston Collander

"No one person's opinions could be said to be 'truer' than another's. For each is the sole judge of his or her own experiences." - Protagoras
11/9/2004 7:06:26 PM 16182 articles. 0 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 3 the MSDN articles about Dataset and Datareader objects. they will walk you through introducing the objects to some sample code..

Dinakar Nethi
Life is short. Enjoy it.
11/9/2004 7:28:29 PM
check out:
David Wier
MCP/ASPInsider - where to look first!
Control Grouper - easily control properties for multiple controls with one control!
Calendar Express - The Best HTML Calendar Generator on the web!
(Please 'Mark as Answer' when it applies)
11/9/2004 11:16:02 PM

Similar Artilces:

Sending SMS using or using or
Hi  My requirement is I hav one csv file with these fields id,mobilenum,messgae,status.intiallu staus is 0. once i read the all fileds and take that mobile number.using tat mobile number  i need to send sms .after sending sms i shuld change status as 1 How to send sms thru coding (please dont provide any links.if it is provide also please give working links becox i checked codeproject .i didnt get any nice link. and also provide the how to update the status field im csv file   Thank ssandhya   To send SMS, you need some third party SMS providers. if you consul...

Get tables and fields from Informix database using VB.NET 2005
Hi, I'm relatively new to VB.NET 2005 Express, and I've managed to connect to an Informix database to display the contents of a specific table in a DataGridView. What I am struggling with is getting the table and fields names from the database, and putting the information into a TreeView so that the user can select the table in the tree, and update the grid with that selected table - but I can't seem to get it to collect the schema information. Ideally, I'd like to have the first node on the tree as the database name, followed by nodes for the table name, and the...

How to get datasource name dynamically from .txt / .xml file using 2.0 with Mysql 5.0
I am using C#.Net 2.0 With MySql 5.0. I created a project and it works fine in my machine. But problem occurs when i try to run the project other than my machine. I wrote datasource=mysystem name in connection string. Is it possible to get datasource name dynamically from a text file (*.txt) or from .xml file for MySql.Regards,Tamizhselvi  Add an App.Config file to your project and you can drop a connection string in there like so:  <connectionStrings>    <add name="PICK A NAME" connectionString="YOUR CONNECTION STRING"/>...

How to list all sqlserver names and database names in my network using
 Hai In my network I have 4 computers with sqlserver2000 installed, using C# code how can I list all the sqlservers in my network in a combobox and while selecting a server name how can I list all the databases in another comboboxThanks in advance Regards Anu Palavila Hope this helps.   Have a look at this: for the list of servers, once a server has been selected you need ...

.Net 2.0 Web application using is unable to create object of another dll writen in C# .net 2.0
Hi, I habe created one web application using which is adding reference of dlls written in C# and .net 2.0. But whenever trying to create object of referencing dll, it is throwing error :Object reference does not set to an object. But, locally it is working fine,. In the server i have deployed the .aspx files and dll files in the bin. There were already an web.config in the server which is of .net 1.1. But checked it is retrieving value for that web.config correctly. Should i have to deply any other files and if not what can be the solution for this? Please help. Thanks, So...

How to get new web app to use .NET 2.0 on Win2K server using .NET 1.1 as default framework?
I have .net framework1.1 and 2.0 on our server running win2K. i have existing applications that uses 1.1, i also have a new app that use 2.0.  how can i set my new .NET 2.0 app to point to 2.0 without messing up my existing .NET 1.1 apps? To specify the ASP .Net version fro a web application, do the followingIn IIS Manager select the web application -> Properties -> ASP.Net TabSelect  ASP.Net version you want to use for the applicationRegards,PrashantDont forget to click "Mark as Answer" on the post that helped you. But I am running Win2K...

How to Retrive the store procedure return value in Ado.Net by using Dot Net?
Hi i am thiru. i try to create the small search engine. so that i have wrote the store procedure for it. thats given below.Create procedure FindtestThree @Name varchar(25), @Location varchar(25), @EmpId varchar(25) as select * from TbInfo where Name like + '%' + @Name + '%' select * from TbInfo where Location like + '%' + @Location + '%' select * from hi where ComName like + '%' + @EmpId + '%' Exec FindtestThree 'aa','a','d' ----------------------------------------- The above procedure return t...

used a to converter and am now getting a syntax error.
ok I used a cool utility at to convert some to and it spit out a bunch of code which almost works but I am getting a syntax error on this line Imports (StreamReader sr = Shadows Function)() As StreamReader(objResponse.GetResponseStream()) I tried it that way and also like Imports (StreamReader sr = Shadows Function)() As StreamReader(objResponse.GetResponseStream()) but either way gave the same error Compiler Error Message: BC30035: Syntax error. Source Error: Line 26: Line ...

use VB.NET and C#.NET code in the same C#.NET project
All-- Here is a sample that is "off the beaten path", (at least for me). Is it possible, in an ASP.NET application, using the code-behind page building technique, to have both pages written in VB.NET and pages written C#.NET?At there is a sample that shows that, (contrary to popular belief), it IS possible to mix ASP.NET pages built with C#.NET with ASP.NET pages built with VB.NET in the same VS.NET 2003 project. Note that this is just a "fun" sample to see if it can be done and I do not recommend this practice as a "standard" way of develo...

Any examples about using Object Database with ADO.NET(c#)
Can I have any examples source codes about using Object Database with ADO.NET(c#) Is this a particular db or Object DB vs Relation DB? If the latter here is one link I found <a href = ""></a>. You might want to also check the threads on the Architecture forum on O/R mappers like Entity Broker, Norpheme etc. HTHEric LandesMADNUG President http://www.madnug.netCrystal Alliance Edit...

Return an Oracle Ref Cursor to a .NET DataReader object by using the .NET Managed Provider for Oracle
Hello, I am wondering if anyone in this community knows the shorter way to return an Oracle Ref Cursor to a .NET DataReader object by using the .NET Managed Provider for Oracle, something likereturn (IDataReader) SqlHelper.ExecuteReader(ConnectionString, "GET_ACCOUNT", Id); instead of using the way below (look at the C# code) Stored Procedure create or replace PROCEDURE "GET_ACCOUNT" ( p_ID IN ACCOUNT.ID%type, retCursor OUT SA.MYGEN.sqlcur ) IS BEGIN OPEN retCursor FOR SELECT ID, NAME FROM ACCOUNT WHERE ID = p_ID ; ...

Cross-Platform .NET Development: Using Mono, Portable.NET, and Microsoft .NET
Interesting book I came across: Cross-Platform .NET Development $49.99 doesn't hurt too much either :) NOTE: Availability: This item has not yet been released. You may order it now and we will ship it to you when it arrives. It's being released on September 30th, 2004 - one to keep an eye - VB.NET, C#, Silverlight, Javascript, HTML, CSS, T-SQL, MySQL and - Gaming News and Reviews How about this book from Oreilly? Mono: A Developer's Notebook

Passing a data field value to a variable using ADO.NET
Hi, I’m already able to connect to a data base and to show a table content using a GridView, but I would like to test a manual way, like we just did it using the past ADO, giving a field value to a variable. In ADO we just did it:   strVariable = TABLE(“FIELD”),   But I have been trying to find something similar with ADO.NET, but every example I found show the data table using ASP Controls or instructions to display the information:   Any Help, Please?   Thanks. You can dig in to the data like this (gets 3rd row, 4th column): strVariable = MyTable.Rows[2].Item...

Get Scope Identity Value using ObjectDataSource and Vb.Net
Hi, I have been trying to get the scope Identity after inserting a record using an ObjectDataSource. I can't find what event, or how to get the value that the scope identity returns. Here is my Sproc. ALTER PROCEDURE dbo.[YourCompany_LanCustomer_Insert]     (     @DNNUserID int,     @FirstName nvarchar(50),     @LastName nvarchar(50),     @Address nvarchar(50),     @Address2 nvarchar(50),     @City nvarchar(50),     @State nvarchar(50),    ...

Get names of files ONLY using module Net::SFTP::Foreign
--=_alternative 00472E2AC1257341_= Content-Type: text/plain; charset="US-ASCII" Hi all, I am a newbie in this forum and Perl too ;-) I am trying writing script transfering files using module Net::SFTP::Foreign. I need to retrieve from remote directory only names of files (not directories, links,etc.). Something like this doesn't work: -------------- use strict; use warnings; use Net::SFTP::Foreign; my $remote_dir = "/tmp"; my $sftp = Net::SFTP::Foreign->new("host"); $sftp->error and print "SSH connection failed: &qu...

Web resources about - How to get Field Values and Names from a database using ASP.NET -

Database - Wikipedia, the free encyclopedia
A database is an organized collection of data . The data are typically organized to model aspects of reality in a way that supports processes ...

Database - Wikipedia, the free encyclopedia
... requiring information. For example, modelling the availability of rooms in hotels in a way that supports finding a hotel with vacancies. Database ...

Ben Carson calls for a database on 'every foreigner'
Boston Herald Ben Carson calls for a database on 'every foreigner' Boston Herald Republican presidential candidate, Dr, Ben Carson, center, ...

GOP rivals condemn Donald Trump for backing Muslim database
COLUMBIA, S.C. (AP) — Retired neurosurgeon Ben Carson said Saturday that he wants to expand the government's surveillance operations aimed at ...

Donald Trump walks back Muslim database comments - Videos - CBS News
Republican candidate Donald Trump stepped back from comments that appear to suggest that he wants to register all of the Muslims in the United ...

Trump: ‘I Didn’t Suggest A Database’ For Registering Muslims
Trump: ‘I Didn’t Suggest A Database’ For Registering Muslims

US Republican rivals blast Donald Trump for Muslim database comments
US Republican rivals blast Donald Trump for Muslim database comments - Donald Trump said he would implement a database to keep track of Muslims ...

Trump calls for surveillance of some mosques, attempts to clarify remarks on Syrian database
Trump calls for surveillance of some mosques, attempts to clarify remarks on Syrian database

Presidential Candidates Condemn Donald Trump's 'Database' Comment
... and Democratic presidential candidates have condemned Donald Trump for his recent statements suggesting the United States should start a database ...

Donald Trump is Under Media Assault for Suggesting ‘Muslim Database,’ But Here’s What He Says About It ...
"Donald Trump's plan for a Muslim database draws comparison to Nazi Germany"...

Resources last updated: 11/23/2015 4:19:46 PM