ADO.NET equivalent to ADO recordset

I'm new to ASP.NET 2.0 and ADO.Net but have some experience with oldschool ASP and ADO :)
My question is ADO.NET has an equivalent to ADO recordset?

In normal ADO I use to read and compare database cells 

1    set User= Server.CreateObject("ADODB.Recordset")
2    User_sql = "SELECT * FROM tblUsers WHERE UserName='" & Request.Form("UserName") & "'"
3 User_sql, Conn
if User("Password") = Request.form("Password") then
6 Response.write(User("Password"))
7 end if
 I've been searching the net for a day or two now but I just can't seem to find an equivalent to recordsets in
All I find is how to print the results generated from a SqlDataSource but no way to compare the values of database cells.
 Would appreciate any help in this matter as long
9/22/2006 10:23:30 PM 901 articles. 0 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 1

Hi Enoook,

    There are many ways by which you can do it in One of them would be as below :


Dim sqlComm As New SqlCommand("SELECT pwd FROM tblusers Where UserName = " & Request.Form("UserName") , sqlConn)

Dim r As SqlDataReader = sqlComm.ExecuteReader()

Dim pwd As String

While r.Read()

    pwd = CStr(r("pwd"))

End While


Hemant Purkar
( Principal Software Consultant )
Please mark it as answer if it helps you resolve
2/8/2007 9:11:58 PM

ExecuteScalar() would be better, as you're only expecting one value to be returned (pwd)

Dim sqlComm As New SqlCommand("SELECT pwd FROM tblusers Where UserName = " & Request.Form("UserName") , sqlConn)
Dim pwd As String = sqlComm.ExecuteScalar().ToString()

2/9/2007 9:46:21 AM

Similar Artilces:

Does .NET map calls for ADO to ADO.NET?
Hello,We are trying to troubleshoot some DB problems from COM objects that call ADO. I heard that when ADO is loaded inside of a COM object by a .NET app, that .NET intercepts the call and re-maps those calls over to ADO.NET. This seems untrue to me, given the nature of ADO.NET being a totally separate technology.Does anyone know for sure whether this does or does not occur?The problem we are seeing is actually almost identical in symptoms to this:"FIX: Data Queries Sporadically Return Empty Recordsets" Literally, this is what...

I am writing a database interface and I would like to know whether a VB6 interface using ADO or a VB.NET interface using ADO.NET would be faster in terms of just performing database operations. Is there an explanation for this, and what is the magnitude of the difference? Thanks in advance!...

I'm an ASP programmer (VBScript) moving on to ASP.NET. So far I'm using:Microsoft Visual Studio 2003ASP.NET with C#I'm working on converting my code over to C#, from VBScript. Now, here is my code in VBScript (modified to better understand it, this is a edited ugly version):Function ExecuteSQL(sqlStatement)    ConnDriver = "Provider=SQLOLEDB; Data Source = " & dbIP & "; Initial Catalog = " & dbName & "; User Id = " & dbUser & "; Password=" & dbPassword     Set connTemp = Server.CreateObject("ADODB.Connection")    c...

Hi, I have to connect to a db using adodb (which i select from the references). I have to retrieve the car models from the database and bind them to a listbox. I am not sure how to proceed and I can't find any articles on ADO with .net and data binding. Here is the code that i tried but it only retrieves the car model for the specified id. If I delete the id it doesn't work. Also it writes the car model in the listbox vertically such as: B M W CODE: Imports System.Data Imports ADODB Imports System.Data.OleDb Public Class listboxADO Inherits System.Web.UI...

Converting .NET ADO Dataset to ADO Recordset
Hi Experts, I have a .NET dataset and I have to convert it to an ADO Recordset to call a method of an ocx because the parameter of this method is an ADO recordset. How can I do that ??? Here is my function where I have to convert Public Sub DisplayAgentStats() Dim objConnection As SqlConnection Dim objCommand As SqlDataAdapter Dim sConnStr As String Dim sSQL As String Dim ds As New DataSet() Dim ReturnCode As Integer sConnStr = "server=ServerA;database=DB1;uid=sa" sSQL = "sele...

how to cast a Recordset from ADO to a ADO.NET Data Struct
Hi! can somebody tell me how to cast a Recordset from ADO to a ADO.NET Data Struct the ado recordset is in a dll that is called from an app that is being build in C#.NET Thanks in advance Luis Diego Rojas You can't. You can only cast objects that inherit from the same base class (oversimplification, but that's the gist of it). It sounds like you want to convert it from a recordset to something else in .NET, right? What do you want it as? XML data? A data set? Something else? Give us more information and we'll try to help. DonDon Kiely, MC...

ADO.NET Visual Studio 2005 Install Help!, ADO.NET Missing
 Hi everyoneI have a real annoying problem, I have installed Visual Studio 2005 with C#,C++,Web Applications.. Before I installed VS2005 I made sure I had all the .Net Download from 1.1 to 3.5 with the Service Packs, I also Installed a VS2005 Patch that was around 430mb. I have tried this on 3 computers, two of XP and 1 vista.I need ADO.NET Functionality, When I choose to create a Web Application in C#, I require the ADO.NET Entity Data Model as it will allow for a graphical interaction with a SQL db. However When I Choose Add New Item in Solution explorer there is no ENtity Mode...

Opinions about ADO and ADO.NET
Hi everyone again!!! I´m used to develope applications with ADO, but now with .NET to develope a Web Application and a Mobile Web Application, I don't know if I have to use ADO.NET or continue using ADO. What Disadvantages has ADO to built Mobile Applications? In ADO I use ACCESS to create the .mdb files, Can I use .mdb files with ADO.NET? Thanks for all!! Go to ADO.NET NOW ! don't be late and you can use access in ADO.NET VB.NET/C#/ASP.NET/Oracle Designer 6i Building a custom web control( Well, Thanks for your opinion, but I have...

ADO to ADO.NET help
Hi, I am converting application ASP to ASP.NET.What is the equivalent code in ADO.NET. For each F in RS.Fields FieldName = F.Name Next Thanks, Nate If it is forward only, then you can use datareader for more info on this, check below link Datareader on MSDN Hope it helps!Sreedharhttp://www.w3coder.orgweblog

Converting ADO to ADO.NET
Hi, I am trying to convert this code from ADO to ADO.NET I am very new to ADO.NET and am a bit confused on how I would convert this. Basically what I am trying to do is capture the name of the fields of a table to populate a dropdownlistbox. The table name will change every time the program is run. This is not a problem and I can code for that. Here is what I have in ADO (I have tried the wizard but it did not change the code) Dim tblFields As Object Dim myRst As New ADODB.Recordset Dim myField As ADODB.Field Dim myCnn As New ADODB.C... or/and
Hi, Can work with Sybase's or are they not compatible with each other. We have two separate groups of developers, one group develops web apps using ASE as the back end for the data, so they use a combination of Visual Studio ..NET and Sybase's to do their work. We have another group that develops client/server apps using Powerbuilder, but since 80% of their work is in writting reports using Powerbuilder, I was wondering if they could use a combination of and to put make these reports available on the web through ...

Hi I am having ADO.NET course these days. I asked the instructor that developing online system like airline reservation system needs to a connected environment to lock/Unlock the table when u read/write to it Can that be acomplished using His answer was no ADO.NET is only for disconnected environment and it will not work with online system and i still should use the old ADO. ADO.NET is not a replacment for ADO and both will continue in paralell. IS his answer true that ADO.NET will not replace ADO and both will continue Regards Check this link. Well ADO.NET is pa...

Where is the ADO.NET Sybase driver for .NET 1.1 and .Net 2.0?
Hi All Does anyone know where I can get the Sybase drivers for ADO.NET for both versions, 1.1 and 2.0/3.0? Cheers Chris Burrell Hi Chris, There is no release of ASE ADO.NET Provider 2.0 (I assume you refer to ASE provider, not ASA - if ASA please port to sybase.public.sqlanywhere.general). For the 1.1 Provider: It is available in the ASE SDK for windows or the PC Client CDRom included with ASE product. On the SDK its available as 12.5.1 and 15.0 On ASE PC Client I think 12.5.1 is part of ASE 12.5.X and 15.0 is part of ASE 15.X 2.0 provider should release som...

ADO recordset in .NET
Is it possible to create ADO recordet in .NET? Of course. See replies as answers if they helped you solve the problem. Yes... Adding a COM component reference to 'ActiveX Data Objects X.X library' will enable you to create VB recordset object. thanks , that's it !  ...

Web resources about - ADO.NET equivalent to ADO recordset -

Antenna equivalent radius - Wikipedia, the free encyclopedia
... length of the circumference, and are vectors locating points along the circumference, and and are differentials segments along it. The equivalent ...

Equivalent Fractions on the App Store on iTunes
Get Equivalent Fractions on the App Store. See screenshots and ratings, and read customer reviews.

Rate of Indigenous children in child protection 'almost equivalent to another Stolen Generation'
The rate of Indigenous Australians in the child protection system has reached "epidemic levels".

Golf's equivalent to Brownlow - the Greg Norman Medal - set for Gold Coast
Australian golf's new equivalent to AFL's Brownlow Medal or rugby league's Dally M award – the new Greg Norman Medal – will be unveiled ...

Uber X 'surge' charge turns Northbridge cup day ride into equivalent of airfare
A Sorrento businessman has come away from the Melbourne Cup with a big tip for punters after an Uber X cup day ride.

OnePlus X may cost the equivalent of $270 in China
Despite the 'clandestine' nature of OnePlus' second offering this year, the company has been surprisingly straightforward with it. Months ago, ...

Franklin Gutierrez: Rich Hill's hitting equivalent
Franklin Gutierrez had a 167 wRC+ and produced 2.3 fWAR in 189 PA, and he did it while staying under the radar. Franklin Gutierrez's 2015 comeback ...

America has built the equivalent of 10 Keystone pipelines since 2010, by @Gaius_Publius
America has built the equivalent of 10 Keystone pipelines since 2010 by Gaius Publius The blue lines show expansion since 2005. Note the expansions ...

America Has Built the Equivalent of 10 Keystone Pipelines Since 2010
... obscures a sobering fact. A virtual Keystone pipeline is being built anyway. Yadullah Hussain at Financial Post : America has built the equivalent ...

The top-end Surface Book costs £250 more than the equivalent MacBook Pro
Microsoft has revealed the price of the most expensive Surface Book — and it costs $400 (£258) more than the equivalent MacBook Pro at $3,199 ...

Resources last updated: 1/10/2016 1:53:13 AM