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

  • Home
  • SEARCH
  • 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 6207135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:34:34+00:00 2026-05-24T05:34:34+00:00

sorgu.CommandText = select count(*) from mert; I want to use within if statement to

  • 0
sorgu.CommandText = "select count(*) from mert";

I want to use within if statement to count value in that query.And,I want to access to that value.How can I do that?

Code:

OracleConnection conn = new OracleConnection(@"DATA SOURCE=;USER ID=orcl2; Password=123");
        conn.Open();
        OracleCommand sorgu = new OracleCommand();
        sorgu.CommandText = "select * from mert";
        sorgu.Connection = conn;
        OracleDataReader oku = sorgu.ExecuteReader();
        while (oku.Read())
        {
            if (oku[0].ToString() == textBox1.Text && oku[1].ToString() == textBox2.Text)
            {
                Form2 f = new Form2();
                f.ShowDialog();
            }
        }
        oku.Close();

Cheers,

  • 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-24T05:34:34+00:00Added an answer on May 24, 2026 at 5:34 am

    I have never used an Oracle database before, but per MSDN this is how you need to interact with your data:

      command.CommandText = "SELECT * FROM OracleTypesTable";
      OracleDataReader reader = command.ExecuteReader();
      reader.Read();
      //Using the Oracle specific getters for each type is faster than
      //using GetOracleValue.
      //First column, MyVarchar2, is a VARCHAR2 data type in Oracle Server
      //and maps to OracleString.
      OracleString oraclestring1 = reader.GetOracleString(0);
      Console.WriteLine("OracleString " + oraclestring1.ToString());
    
      //Second column, MyNumber, is a NUMBER data type in Oracle Server
      //and maps to OracleNumber.
      OracleNumber oraclenumber1 = reader.GetOracleNumber(1);
      Console.WriteLine("OracleNumber " + oraclenumber1.ToString());
    

    So, for each column, you have to setup an OracleString, OracleNumber, OracleDateTime, OracleBinary, etc. The corresponding functions (e.g. GetOracleString(col)) is how you actually retrieve the data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a windows form and user select cloth parameters from comboboxes like country-state-city
I've created a SQL data source which gets data from a Interbase database, I
I am using ADO.NET Entity framework for connect db and get data. I want
i am new at Java , i got a problem like this ; i
My code is: String baglantiURL=jdbc:postgresql://localhost:5432/Test; String surucu=org.postgresql.Driver; try{ Class.forName(surucu); Connection baglanti=DriverManager.getConnection(baglantiURL); Statement ifade=baglanti.createStatement(); String
I'm creating a search engine for my asp page.There are 15 pieces filtering options
I am getting this error while trying to connect my web site. Unspecified error
i am getting The object cannot be deleted because it was not found in
the following messege appears when I compile this code. ExtractChars(java.lang.String,int) in Question2 cannot be

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.