Click here to Skip to main content
12,252,903 members (58,234 online)
   

C#

 
AnswerRe: how to get an data from data Gride view in C# Pin
Richard MacCutchan15-Oct-12 22:16
mvpRichard MacCutchan15-Oct-12 22:16 
AnswerRe: how to get an data from data Gride view in C# Pin
Abhinav S16-Oct-12 20:36
mvpAbhinav S16-Oct-12 20:36 
QuestionSuggest a solution. Pin
Ambika Jadhav15-Oct-12 20:36
memberAmbika Jadhav15-Oct-12 20:36 
AnswerRe: Suggest a solution. Pin
Pete O'Hanlon15-Oct-12 22:10
protectorPete O'Hanlon15-Oct-12 22:10 
AnswerRe: Suggest a solution. Pin
Eddy Vluggen16-Oct-12 2:03
memberEddy Vluggen16-Oct-12 2:03 
GeneralRe: Suggest a solution. Pin
Pete O'Hanlon16-Oct-12 2:42
protectorPete O'Hanlon16-Oct-12 2:42 
GeneralRe: Suggest a solution. Pin
Eddy Vluggen16-Oct-12 3:00
memberEddy Vluggen16-Oct-12 3:00 
GeneralRe: Suggest a solution. Pin
Ambika Jadhav16-Oct-12 19:56
memberAmbika Jadhav16-Oct-12 19:56 
Questionplay video in memory stream Pin
SumithF15-Oct-12 19:48
memberSumithF15-Oct-12 19:48 
AnswerRe: play video in memory stream Pin
Pete O'Hanlon15-Oct-12 23:24
protectorPete O'Hanlon15-Oct-12 23:24 
AnswerRe: play video in memory stream Pin
Eddy Vluggen16-Oct-12 2:00
memberEddy Vluggen16-Oct-12 2:00 
QuestionVS2008 deployment not creating directories Pin
Wolfram Steinke15-Oct-12 15:04
memberWolfram Steinke15-Oct-12 15:04 
AnswerRe: VS2008 deployment not creating directories Pin
Dave Kreskowiak15-Oct-12 17:29
mvpDave Kreskowiak15-Oct-12 17:29 
QuestionNo overload takes 5 arguments error (C# datagrid) Pin
saiprakash031515-Oct-12 11:13
membersaiprakash031515-Oct-12 11:13 
Hi,
I'm working with two datables in the same dataset. My first Table is 'Address_Table' which contains a_id (which is PK), s_id (which is FK referencing 'Students' Table S_ID), address, city state, zip. (which are displayed in text boxes) My second table 'Students' contains S_ID (PK), Name, Degree,Class, Percentage (Which are displayed in a Grid). My Question when i enter the text in the texboxes and in GridView and Click 'Save' both those data needs to stored into the 'Address_Table' and 'Students' respectively. I'm having no problems saving the data in the gridview but however getting this error at this line when i'm trying to send the textboxes.
this.address_TableTableAdapter.Fill(this.studentsDataSet.Address_Table,txtAddress.Text, txtCity.Text, cboState.Text,txtZip.Text); //No overload takes 5 arguments error.
Let me know if i did something wrong or if i have to add some more stuff Thanks

Sai

Here is the code
 using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
 
namespace students_normalization
{
    public partial class DegreeForm : Form
    {
        public DegreeForm()
        {
            InitializeComponent();
        }
 
        private void DegreeForm_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'studentsDataSet.Address_Table' table. You can move, or remove it, as needed.
            this.address_TableTableAdapter.Fill(this.studentsDataSet.Address_Table);
 
            try
            {
                // TODO: This line of code loads data into the 'studentsDataSet.Students' table. You can move, or remove it, as needed.
                this.studentsTableAdapter.Fill(this.studentsDataSet.Students);
            }
            catch (SqlException ex)
            {
                MessageBox.Show("Database Error # " + ex.Number + ": " + ex.Message, ex.GetType().ToString());
            }
        }
 
        private void btnSave_Click(object sender, EventArgs e)
        {
           // DialogResult dialogResult = ("Do you want to Save Data?","Save Data", MessageBoxButtons.YesNo);

            if(MessageBox.Show("Do you want to Save or Update a record","Update Record",MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
 
            this.Validate();
            this.studentsBindingSource.EndEdit();
            this.addressTableBindingSource.EndEdit();
            this.studentsTableAdapter.Update(this.studentsDataSet);
            this.address_TableTableAdapter.Update(this.studentsDataSet);
            this.studentsTableAdapter.Fill(this.studentsDataSet.Students);
            this.address_TableTableAdapter.Fill(this.studentsDataSet.Address_Table,txtAddress.Text, txtCity.Text, cboState.Text,txtZip.Text); //No Overload takes 5 arguments Error
            }
        }
 
        private void btnCancel_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Do you want to Cancel", "Cancel", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                this.studentsBindingSource.CancelEdit();
            }
 
        }
 
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Do you want to Delete the Record", "Delete Record", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                this.studentsBindingSource.RemoveCurrent();
                this.studentsTableAdapter.Update(this.studentsDataSet);
            }
        }
 

       
 
    }
}

AnswerRe: No overload takes 5 arguments error (C# datagrid) Pin
Richard Andrew x6415-Oct-12 11:28
memberRichard Andrew x6415-Oct-12 11:28 
QuestionRe: No overload takes 5 arguments error (C# datagrid) Pin
n.podbielski15-Oct-12 11:43
membern.podbielski15-Oct-12 11:43 
AnswerRe: No overload takes 5 arguments error (C# datagrid) Pin
saiprakash031516-Oct-12 5:52
membersaiprakash031516-Oct-12 5:52 
QuestionConverting from C to C# Pin
AseelHadlaq15-Oct-12 6:53
memberAseelHadlaq15-Oct-12 6:53 
AnswerRe: Converting from C to C# Pin
Marcus Kramer15-Oct-12 7:06
memberMarcus Kramer15-Oct-12 7:06 
AnswerRe: Converting from C to C# Pin
jschell15-Oct-12 7:40
memberjschell15-Oct-12 7:40 
GeneralRe: Converting from C to C# Pin
AseelHadlaq15-Oct-12 8:30
memberAseelHadlaq15-Oct-12 8:30 
GeneralRe: Converting from C to C# Pin
jschell15-Oct-12 12:46
memberjschell15-Oct-12 12:46 
GeneralRe: Converting from C to C# Pin
AseelHadlaq16-Oct-12 5:38
memberAseelHadlaq16-Oct-12 5:38 
GeneralRe: Converting from C to C# Pin
jschell16-Oct-12 8:36
memberjschell16-Oct-12 8:36 
AnswerRe: Converting from C to C# Pin
Dave Doknjas15-Oct-12 9:41
memberDave Doknjas15-Oct-12 9:41 
GeneralRe: Converting from C to C# Pin
AseelHadlaq16-Oct-12 5:43
memberAseelHadlaq16-Oct-12 5:43 
AnswerRe: Converting from C to C# Pin
DaveyM6915-Oct-12 11:30
mentorDaveyM6915-Oct-12 11:30 
GeneralRe: Converting from C to C# Pin
AseelHadlaq16-Oct-12 5:45
memberAseelHadlaq16-Oct-12 5:45 
AnswerRe: Converting from C to C# Pin
Bernhard Hiller15-Oct-12 22:35
memberBernhard Hiller15-Oct-12 22:35 
GeneralRe: Converting from C to C# Pin
AseelHadlaq16-Oct-12 5:49
memberAseelHadlaq16-Oct-12 5:49 
GeneralRe: Converting from C to C# Pin
Pete O'Hanlon16-Oct-12 6:21
protectorPete O'Hanlon16-Oct-12 6:21 
QuestionDirectoryEntry Questions Pin
Erick Kinnee15-Oct-12 4:37
memberErick Kinnee15-Oct-12 4:37 
QuestionRe: DirectoryEntry Questions Pin
Richard MacCutchan15-Oct-12 4:45
mvpRichard MacCutchan15-Oct-12 4:45 
AnswerRe: DirectoryEntry Questions Pin
Erick Kinnee15-Oct-12 4:49
memberErick Kinnee15-Oct-12 4:49 
GeneralRe: DirectoryEntry Questions Pin
Richard MacCutchan15-Oct-12 5:04
mvpRichard MacCutchan15-Oct-12 5:04 
AnswerRe: DirectoryEntry Questions Pin
Eddy Vluggen15-Oct-12 5:04
memberEddy Vluggen15-Oct-12 5:04 
QuestionMessageBox error Pin
Saridakis Manolis14-Oct-12 23:36
memberSaridakis Manolis14-Oct-12 23:36 
AnswerRe: MessageBox error Pin
sirama200414-Oct-12 23:39
membersirama200414-Oct-12 23:39 
AnswerRe: MessageBox error Pin
Pete O'Hanlon15-Oct-12 0:21
protectorPete O'Hanlon15-Oct-12 0:21 
AnswerRe: MessageBox error Pin
Eddy Vluggen15-Oct-12 0:43
memberEddy Vluggen15-Oct-12 0:43 
QuestionUnhandledException Pin
Hamid.14-Oct-12 3:38
memberHamid.14-Oct-12 3:38 
AnswerRe: UnhandledException Pin
OriginalGriff14-Oct-12 3:49
mvpOriginalGriff14-Oct-12 3:49 
GeneralRe: UnhandledException Pin
Hamid.14-Oct-12 4:14
memberHamid.14-Oct-12 4:14 
GeneralRe: UnhandledException Pin
OriginalGriff14-Oct-12 4:25
mvpOriginalGriff14-Oct-12 4:25 
GeneralRe: UnhandledException Pin
Hamid.14-Oct-12 5:03
memberHamid.14-Oct-12 5:03 
GeneralRe: UnhandledException Pin
OriginalGriff14-Oct-12 5:12
mvpOriginalGriff14-Oct-12 5:12 
GeneralRe: UnhandledException Pin
Hamid.14-Oct-12 5:25
memberHamid.14-Oct-12 5:25 
GeneralRe: UnhandledException Pin
jschell14-Oct-12 6:59
memberjschell14-Oct-12 6:59 
AnswerRe: UnhandledException Pin
Eddy Vluggen14-Oct-12 3:50
memberEddy Vluggen14-Oct-12 3:50 
GeneralRe: UnhandledException Pin
Hamid.14-Oct-12 4:17
memberHamid.14-Oct-12 4:17 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.160426.1 | Last Updated 5 May 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid