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 6377475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:52:42+00:00 2026-05-25T01:52:42+00:00

How can I make a program stop in order to insert inputs, such as

  • 0

How can I make a program stop in order to insert inputs, such as username and password,

    "UserId=te; PWD=t57; database=ph3;");

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using MySql.Data.MySqlClient;

    namespace ConsoleApplication2
    {
        class Program
        {
            static void Main(string[] args)
            {
                MySqlConnection conDatabase = new MySqlConnection("Data Source=localhost;" +
                                           "Persist Security Info=yes;" +
                                           "UserId=te; PWD=t57; database=ph3;");
                conDatabase.Open();
                // MySqlCommand cmdDatabase = new MySqlCommand("DROP TABLE IF EXISTS `q_mem_sur`; create table q_mem_sur as SELECT Count(*) As rowa,  member.Ssurname,  Sum(Case When ((member.status = '1')) Then 1 Else 0 End) As Status11 From member Group By member.Ssurname Order By rowa Desc;", conDatabase);

                string[] arr = new string[12];
                arr[0] = "UPDATE `member` SET `amphurecode`= SUBSTRING(member.own,3,4)";
                arr[1] = "UPDATE `member` SET `provincecode`= SUBSTRING(member.own,3,2)";
                arr[2] = "DROP TABLE IF EXISTS `q_mem_tim`; create table q_mem_tim as SELECT member.idmember, member.own, member.provincecode, province.PROVINCE_NAME, member.amphurecode, amphur.AMPHUR_NAME, member.novote, member.Sname, member.Ssurname, member.Hno, member.Moo, member.Sex, member.tambol, member.dateofbirth, member.migratedate, Year( Current_Date( ) ) -  Year( member.dateofbirth ) AS y,  DATEDIFF('2011-08-01',(migratedate)) AS d FROM member LEFT JOIN amphur ON ( member.amphurecode  = amphur.AMPHUR_CODE ) LEFT JOIN province ON member.provincecode  = province.PROVINCE_CODE";

                arr[10] = "UPDATE q_mem_birth SET agec = CASE WHEN y < 10 THEN '¿'  WHEN y > 10 and y < 20 and Sex='¿' THEN  '¿¿'  WHEN y > 10 and y < 20 and Sex='¿' THEN  '¿¿'   ELSE '¿¿' END";
                arr[11] = "drop table if exists q_mem_birth; create table q_mem_birth as SELECT q_mem_tim.idmember,q_mem_tim.own,q_mem_tim.PROVINCE_NAME,q_mem_tim.AMPHUR_NAME,q_mem_tim.novote,q_mem_tim.Sname,q_mem_tim.Ssurname,q_mem_tim.Hno,q_mem_tim.Moo,q_mem_tim.Sex,q_mem_tim.tambol,q_mem_tim.dateofbirth,q_mem_tim.migratedate,q_mem_tim.y,q_mem_tim.d,q_mem_tim.agec FROM q_mem_tim where  q_mem_tim.dateofbirth is not null and q_mem_tim.dateofbirth != '00000000' and day(q_mem_tim.dateofbirth) != '00' and day(q_mem_tim.dateofbirth) > 0 and day(q_mem_tim.dateofbirth) < 11 and month(q_mem_tim.dateofbirth) != '00'   and month(q_mem_tim.dateofbirth) > 8 and month(q_mem_tim.dateofbirth) < 10 order by tambol,Moo, month(dateofbirth),day(dateofbirth)  ";

                foreach (string s in arr)
                {
                    Console.WriteLine(s);
                    MySqlCommand cmdDbase = new MySqlCommand((s), conDatabase);
                    cmdDbase.CommandTimeout = 500;
                    cmdDbase.ExecuteNonQuery();
                }
                conDatabase.Close();
            }

        }
    }
  • 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-25T01:52:42+00:00Added an answer on May 25, 2026 at 1:52 am

    You probably want to use the Console.ReadLine(); method. For more details, see Console.ReadLine Method (MSDN).

    Something like this:

    Console.WriteLine("Enter username");
    string uname=Console.ReadLine();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

so that you can make your program concurrent easily in the future.
how can i make java program working with multiple languages (frensh, english , arabic
I want to know how I can make a Java program where an unknown
Ok, let's see if I can make this make sense. I have a program
how can i make a device input and output control program on windows 7??
I want to make a C# program that can be run as a CLI
I have a simple program, which needs to make sure I can connect to
How can I make program in C++ that will read .exe or another file
I can make a DAO recordset in VB6/Access do anything - add data, clean
I can make Firefox not display the ugly dotted focus outlines on links with

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.