Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7023493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:43:05+00:00 2026-05-27T23:43:05+00:00

I am using visual studio 2010 and Oracle 10g. Operating system: Windows 7 home

  • 0

I am using visual studio 2010 and Oracle 10g. Operating system: Windows 7 home basic. If I use the following code in visual studio 2005, I am getting a correct output. But in Visual Studio 2010 I get an error

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.OracleClient;
using System.Windows.Forms;

public partial class Default2 : System.Web.UI.Page
{
    OracleConnection con = new OracleConnection("uid=scott;pwd=tiger;data source=");
    OracleCommand cmd = new OracleCommand();
    OracleDataReader dr;
    string name1, pass1;
    protected void Page_Load(object sender, EventArgs e)
    {
        con.Open();
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        cmd = new OracleCommand("Select* from tb1 where name='" + TextBox1.Text + "'and pass='"+TextBox2.Text + "'", con);
        dr = cmd.ExecuteReader();
        while (dr.Read())
        {
            name1 = dr[0].ToString();
            pass1 = dr[1].ToString();
        }
        if (name1 == TextBox1.Text && pass1 == TextBox2.Text)
        {
            Response.Redirect("Home.aspx");
        }
        else
        {
            MessageBox.Show("Incorrect user name or password");
        }
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:43:06+00:00Added an answer on May 27, 2026 at 11:43 pm

    It could be a problem with the tnsnames.ora, where your connection is defined.

    You can omit tnsnames.ora with this connection string:

    OracleConnection con = new OracleConnection("Data Source=(DESCRIPTION =(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)))(CONNECT_DATA =(SERVICE_NAME = !!!!!!!!YOURDBNAME!!!!!!!!!)(SERVER = DEDICATED))); User Id=Scott;Password=tiger;");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having the following problem using the Visual Studio 2010 Team System Beta 1:
I'm running Windows 7 Ultimate (64 bit) using Visual Studio 2010 RC. I recently
I want to be able to develop code using Visual Studio 2010. I just
I'm using Visual Studio 2010 on Windows 7 32bit, and I'm working on my
I am using Visual Studio 2010 SP1 in Windows 7 64bit dev box. My
Using Visual Studio 2010 C++ with googlemock. I'm trying to use a mock I
For a solo developer using Visual Studio 2010 beta 2 is TFS Basic a
I'm using Visual Studio 2010. When I change the code in my source file,
i am using visual studio 2010 and Windows XP on a macbook through bootcamp.
I'm using Visual Studio 2010 on a Windows XP SP3 machine and I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.