Click here to Skip to main content
15,887,867 members
Home / Discussions / C#
   

C#

 
GeneralRe: add button in run time Pin
PIEBALDconsult21-Apr-12 7:05
mvePIEBALDconsult21-Apr-12 7:05 
GeneralRe: add button in run time Pin
Nabawoka21-Apr-12 6:01
Nabawoka21-Apr-12 6:01 
AnswerRe: add button in run time Pin
Nabawoka21-Apr-12 6:08
Nabawoka21-Apr-12 6:08 
AnswerRe: add button in run time Pin
Abhinav S21-Apr-12 6:11
Abhinav S21-Apr-12 6:11 
GeneralRe: add button in run time Pin
Nabawoka21-Apr-12 6:20
Nabawoka21-Apr-12 6:20 
Questionms access database ( help pls) Pin
mohammed_198321-Apr-12 2:45
mohammed_198321-Apr-12 2:45 
AnswerRe: ms access database ( help pls) Pin
Wes Aday21-Apr-12 2:51
professionalWes Aday21-Apr-12 2:51 
GeneralRe: ms access database ( help pls) Pin
mohammed_198321-Apr-12 2:57
mohammed_198321-Apr-12 2:57 
C#
private void Add_btn_Click(object sender, System.EventArgs e)
        {
            try
            {
                this.oleDbDataAdapter1.InsertCommand.CommandText =
                    "INSERT INTO Db (p-name, address, ID, dnasequence)" +
                    "VALUES     ('"+ this.textBox3.Text +"','"+this.textBox4.Text+
                    "' , "+ this.textBox1.Text +",'"+ this.textBox2.Text+ "')";

                //open the bridge between the application and the datasource
                this.oleDbConnection1.Open();

                this.oleDbDataAdapter1.InsertCommand.Connection = oleDbConnection1;

                 //execute the qurey
                this.oleDbDataAdapter1.InsertCommand.ExecuteNonQuery();

                //close the connection
                this.oleDbConnection1.Close();

                MessageBox.Show("Record insedted Successfully");






C#
private void up_btn_Click(object sender, System.EventArgs e)
        {
            try
            {
                this.oleDbDataAdapter1.UpdateCommand.CommandText =
                    "UPDATE    Db SET "+
                    "p-name ='"+ this.textBox3.Text +"', address ='"+this.textBox4.Text +
                    "', ID ="+this.textBox1.Text+", dnasequence ='"+ this.textBox2.Text+"'"  +
                     " WHERE  ID ="+ this.textBox1.Text;

                //open the bridge between the application and the datasource
                this.oleDbConnection1.Open();

                this.oleDbDataAdapter1.UpdateCommand.Connection = oleDbConnection1;

                //execute the qurey
                this.oleDbDataAdapter1.UpdateCommand.ExecuteNonQuery();

                //close the connection
                this.oleDbConnection1.Close();

                MessageBox.Show("Record updated Successfully");

QuestionRe: ms access database ( help pls) Pin
Eddy Vluggen21-Apr-12 3:23
professionalEddy Vluggen21-Apr-12 3:23 
AnswerRe: ms access database ( help pls) Pin
mohammed_198321-Apr-12 3:32
mohammed_198321-Apr-12 3:32 
GeneralRe: ms access database ( help pls) Pin
Eddy Vluggen21-Apr-12 4:15
professionalEddy Vluggen21-Apr-12 4:15 
GeneralRe: ms access database ( help pls) Pin
Wes Aday21-Apr-12 5:08
professionalWes Aday21-Apr-12 5:08 
AnswerRe: ms access database ( help pls) Pin
Abhinav S21-Apr-12 6:09
Abhinav S21-Apr-12 6:09 
Questionhow to render SVG font in C# Pin
m_kramar21-Apr-12 0:03
m_kramar21-Apr-12 0:03 
QuestionC# Bouncing Animation (Diagonally) Pin
Midnight Ahri20-Apr-12 15:29
Midnight Ahri20-Apr-12 15:29 
AnswerRe: C# Bouncing Animation (Diagonally) Pin
Abhinav S20-Apr-12 18:02
Abhinav S20-Apr-12 18:02 
Questiontigrina lexikon seglelet Pin
mululer20-Apr-12 10:11
mululer20-Apr-12 10:11 
AnswerRe: tigrina lexikon seglelet Pin
Richard Andrew x6420-Apr-12 12:38
professionalRichard Andrew x6420-Apr-12 12:38 
QuestionAyo game Pin
cplusplus01820-Apr-12 5:46
cplusplus01820-Apr-12 5:46 
AnswerRe: Ayo game Pin
Pete O'Hanlon20-Apr-12 5:54
mvePete O'Hanlon20-Apr-12 5:54 
GeneralRe: Ayo game Pin
cplusplus01820-Apr-12 6:07
cplusplus01820-Apr-12 6:07 
GeneralRe: Ayo game Pin
Richard Andrew x6420-Apr-12 6:25
professionalRichard Andrew x6420-Apr-12 6:25 
GeneralRe: Ayo game Pin
egenis22-Apr-12 0:13
egenis22-Apr-12 0:13 
GeneralRe: Ayo game PinPopular
DaveyM6920-Apr-12 6:33
professionalDaveyM6920-Apr-12 6:33 
Questionaspxgridview,checkbox and check all Pin
tomorrow_ft20-Apr-12 1:01
tomorrow_ft20-Apr-12 1:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.