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

asp.net database connection

I have problen connecting to the access database through asp.net,
this is the page load code

i have already set the connection strings through the design views...
private void Page_Load(object sender, System.EventArgs e)
{

oleDbConnection1.Open();
oleDbDataAdapter1.SelectCommand.CommandText="selec t country from players";
dataReader=oleDbDataAdapter1.SelectCommand.Execute Reader();
while(dataReader.Read())
{
nameList.Items.Add(dataReader.GetString(0));
oleDbConnection1.Close();
}


}

i got an error
c:\inetpub\wwwroot\dropdown_database\WebForm1.aspx .cs(32): The name 'dataReader' does not exist in the class or namespace 'dropdown_database.WebForm1'

c:\inetpub\wwwroot\dropdown_database\WebForm1.aspx .cs(33): The type or namespace name 'dataReader' could not be found (are you missing a using directive or an assembly reference?)

what it means and how i can overcome this problem ??
Nov 22 '06 #1
0 887

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Mudge | last post by:
Hi, My hosting provider only allows me to use 50 connections to my MySQL database that my Web site will use. I don't know what this 50 connections means exactly. Does this mean that only 50...
11
by: pradeep_TP | last post by:
Hi all, I have a few questions that I have been wanting to ask for long. These are all related to ADO.net and specifically to conenction to database. 1) If I have opened a connection to a...
3
by: R Reyes | last post by:
Hi, I'm trying to modularize my database connections a little better and get more out of my project with less code. First check out this common dbOpen() function inside class clsDatabase. I...
14
by: Nick Gilbert | last post by:
Hi, I have an asp.net application which runs from a CD-ROM using Cassini. As such, it is single user only. The application connects to an Access database when it is loaded, and keeps the same...
7
by: Lau Lei Cheong | last post by:
Hello, Actually I think I should have had asked it long before, but somehow I haven't. Here's the scenerio: Say we have a few pages in an ASP.NET project, each of them needs to connect to...
3
by: Martin B | last post by:
Hallo! I'm working with C# .NET 2.0, implementing Client/Server Applications which are connecting via Network to SQL-Server or Oracle Databases. To stay independent from the underlaying Database...
35
by: Terry Jolly | last post by:
Web Solution Goal: Have a global database connection Why: (There will be 30+ tables, represented by 30+ classes) I only want to reference the database connection once. I put the connection...
6
by: Arsalan Ahmad | last post by:
Hi all, I am creating a website in which in an Item detail page there are a number of web controls (7 or 8) and what is happening that inside each of control's Page_Load() function I am creating...
22
Frinavale
by: Frinavale | last post by:
How To Use A Database In Your Program Many .NET solutions are database driven and so many of us often wonder how to access the database. To help you understand the answer to this question I've...
1
Curtis Rutland
by: Curtis Rutland | last post by:
How To Use A Database In Your Program Part II This article is intended to extend Frinny’s excellent article: How to Use a Database in Your Program. Frinny’s article defines the basic concepts...
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...
1
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...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.