Click here to Skip to main content
15,889,216 members
Home / Discussions / C#
   

C#

 
GeneralRe: Which is the most used programming language Pin
Dan Neely6-Oct-08 10:52
Dan Neely6-Oct-08 10:52 
GeneralRe: Which is the most used programming language Pin
Guffa6-Oct-08 22:22
Guffa6-Oct-08 22:22 
GeneralRe: Which is the most used programming language Pin
PIEBALDconsult6-Oct-08 10:43
mvePIEBALDconsult6-Oct-08 10:43 
GeneralRe: Which is the most used programming language Pin
Mark Churchill6-Oct-08 17:03
Mark Churchill6-Oct-08 17:03 
AnswerRe: Which is the most used programming language Pin
PIEBALDconsult6-Oct-08 10:49
mvePIEBALDconsult6-Oct-08 10:49 
JokeRe: Which is the most used programming language Pin
Pedram Behroozi6-Oct-08 11:37
Pedram Behroozi6-Oct-08 11:37 
AnswerRe: Which is the most used programming language Pin
Guffa6-Oct-08 22:49
Guffa6-Oct-08 22:49 
QuestionProblem inserting row in Access db with TableAdapter in C# [modified] Pin
Edward Hoad6-Oct-08 6:10
Edward Hoad6-Oct-08 6:10 
I am likely overlooking something obvious and simple, but need help with this nonetheless. I am able to retrieve data from the database; however, when inserting, I get the following compile error:

Error 1 Cannot implicitly convert type 'int' to 'MTA_pre_test.MTATest.StudentsDataTable' E:\Documents\Visual Studio 2008\Projects\MTA_pre_test\MTA_pre_test\Form1.cs 100 25 MTA_pre_test

Here is the code:


private void btnAddData_Click(object sender, EventArgs e)
        {
            string fname = txtFname.Text;
            string lname = txtLname.Text;
            

            StudentsTableAdapter studentTA = new StudentsTableAdapter();
            MTATest.StudentsDataTable studentDT = new MTATest.StudentsDataTable();
            studentDT = studentTA.Insert(fname, lname);
            txtFname.Text = "";
            txtLname.Text = "";
        }


Thank you in advance.

modified on Monday, October 6, 2008 1:19 PM

AnswerRe: Problem inserting row in Access db with TableAdapter in C# Pin
Pedram Behroozi6-Oct-08 7:53
Pedram Behroozi6-Oct-08 7:53 
QuestionRe: Problem inserting row in Access db with TableAdapter in C# Pin
Edward Hoad6-Oct-08 11:37
Edward Hoad6-Oct-08 11:37 
AnswerRe: Problem inserting row in Access db with TableAdapter in C# Pin
Pedram Behroozi6-Oct-08 12:15
Pedram Behroozi6-Oct-08 12:15 
AnswerRe: Problem inserting row in Access db with TableAdapter in C# Pin
Edward Hoad6-Oct-08 12:20
Edward Hoad6-Oct-08 12:20 
GeneralRe: Problem inserting row in Access db with TableAdapter in C# Pin
Pedram Behroozi6-Oct-08 12:45
Pedram Behroozi6-Oct-08 12:45 
QuestionGetting installed application version numbers in C# Pin
Matt Fishbeck6-Oct-08 6:07
Matt Fishbeck6-Oct-08 6:07 
QuestionProblems updating datagridview to datasource Pin
Richard Blythe6-Oct-08 5:40
Richard Blythe6-Oct-08 5:40 
QuestionRe: Problems updating datagridview to datasource Pin
nelsonpaixao6-Oct-08 13:16
nelsonpaixao6-Oct-08 13:16 
AnswerRe: Problems updating datagridview to datasource Pin
Richard Blythe6-Oct-08 16:16
Richard Blythe6-Oct-08 16:16 
GeneralRe: Problems updating datagridview to datasource Pin
nelsonpaixao7-Oct-08 12:22
nelsonpaixao7-Oct-08 12:22 
GeneralRe: Problems updating datagridview to datasource Pin
Richard Blythe7-Oct-08 16:13
Richard Blythe7-Oct-08 16:13 
GeneralRe: Problems updating datagridview to datasource Pin
nelsonpaixao8-Oct-08 13:31
nelsonpaixao8-Oct-08 13:31 
QuestionHow to seal a namespace Pin
Member 30621766-Oct-08 5:11
Member 30621766-Oct-08 5:11 
AnswerRe: How to seal a namespace Pin
Mark Churchill6-Oct-08 5:26
Mark Churchill6-Oct-08 5:26 
GeneralRe: How to seal a namespace Pin
Member 30621766-Oct-08 5:41
Member 30621766-Oct-08 5:41 
GeneralRe: How to seal a namespace Pin
Scott Dorman6-Oct-08 6:01
professionalScott Dorman6-Oct-08 6:01 
AnswerRe: How to seal a namespace Pin
S. Senthil Kumar6-Oct-08 6:00
S. Senthil Kumar6-Oct-08 6:00 

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.