Create a console application to display the personal details of a Malaysia’s Resident. System only request the full name and Identity Card number from user as input. Information of user should be generated automatically by system base on their IC number. System must able to display the following personal detail for a particular resident:
• Name of resident
• Date of birth
• Gender
• City of Birth

any 1 that pro in c# pls help me is a rookie for c# but my lecturer want me pass it by tommorow any 1 can help.......forgive me for broken inggeris

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.OleDb;

namespace MyKAD
{
    class Program
    {
        static void Main(string[] args)
        {
            //create the database connection
            OleDbConnection myKADdb = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=myKAD.mdb");

            //open the connection
            myKADdb.Open();

            //create the command object and store the sql query
            OleDbCommand aCommand = new OleDbCommand("select * from myKADdb", myKADdb);
            OleDbDataReader reader = aCommand.ExecuteReader(); // executes query


            //declare variable
            string entericnum;


            Console.WriteLine("What is your IC Num : ");
            entericnum = Console.ReadLine();


            if (reader.Read()) // if can read row from database
            {
                //Display contect full information
                Console.WriteLine("IC Number = " + reader[0].ToString());
                Console.WriteLine("Full Name = " + reader[1].ToString());
                Console.WriteLine("Gender = " + reader[2].ToString());
                Console.WriteLine("City = " + reader[3].ToString());
                Console.WriteLine("Date Of Birth = " + reader[4].ToString());
                Console.WriteLine(" ");
            }
        }


    }
}

this is my fren code but still got error any 1 pls help

This article has been dead for over six months. Start a new discussion instead.