Click here to Skip to main content
15,795,318 members
Home / Discussions / C#
   

C#

 
GeneralRe: Which is the most used programming language Pin
Dan Neely6-Oct-08 11:52
Dan Neely6-Oct-08 11:52 
GeneralRe: Which is the most used programming language Pin
Guffa6-Oct-08 23:22
Guffa6-Oct-08 23:22 
GeneralRe: Which is the most used programming language Pin
PIEBALDconsult6-Oct-08 11:43
professionalPIEBALDconsult6-Oct-08 11:43 
GeneralRe: Which is the most used programming language Pin
Mark Churchill6-Oct-08 18:03
Mark Churchill6-Oct-08 18:03 
AnswerRe: Which is the most used programming language Pin
PIEBALDconsult6-Oct-08 11:49
professionalPIEBALDconsult6-Oct-08 11:49 
JokeRe: Which is the most used programming language Pin
Pedram Behroozi6-Oct-08 12:37
Pedram Behroozi6-Oct-08 12:37 
AnswerRe: Which is the most used programming language Pin
Guffa6-Oct-08 23:49
Guffa6-Oct-08 23:49 
QuestionProblem inserting row in Access db with TableAdapter in C# [modified] Pin
Edward Hoad6-Oct-08 7:10
Edward Hoad6-Oct-08 7: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 8:53
Pedram Behroozi6-Oct-08 8:53 
QuestionRe: Problem inserting row in Access db with TableAdapter in C# Pin
Edward Hoad6-Oct-08 12:37
Edward Hoad6-Oct-08 12:37 
AnswerRe: Problem inserting row in Access db with TableAdapter in C# Pin
Pedram Behroozi6-Oct-08 13:15
Pedram Behroozi6-Oct-08 13:15 
AnswerRe: Problem inserting row in Access db with TableAdapter in C# Pin
Edward Hoad6-Oct-08 13:20
Edward Hoad6-Oct-08 13:20 
GeneralRe: Problem inserting row in Access db with TableAdapter in C# Pin
Pedram Behroozi6-Oct-08 13:45
Pedram Behroozi6-Oct-08 13:45 
QuestionGetting installed application version numbers in C# Pin
Matt Fishbeck6-Oct-08 7:07
Matt Fishbeck6-Oct-08 7:07 
QuestionProblems updating datagridview to datasource Pin
Richard Blythe6-Oct-08 6:40
Richard Blythe6-Oct-08 6:40 
QuestionRe: Problems updating datagridview to datasource Pin
nelsonpaixao6-Oct-08 14:16
nelsonpaixao6-Oct-08 14:16 
AnswerRe: Problems updating datagridview to datasource Pin
Richard Blythe6-Oct-08 17:16
Richard Blythe6-Oct-08 17:16 
GeneralRe: Problems updating datagridview to datasource Pin
nelsonpaixao7-Oct-08 13:22
nelsonpaixao7-Oct-08 13:22 
GeneralRe: Problems updating datagridview to datasource Pin
Richard Blythe7-Oct-08 17:13
Richard Blythe7-Oct-08 17:13 
GeneralRe: Problems updating datagridview to datasource Pin
nelsonpaixao8-Oct-08 14:31
nelsonpaixao8-Oct-08 14:31 
QuestionHow to seal a namespace Pin
Member 30621766-Oct-08 6:11
Member 30621766-Oct-08 6:11 
AnswerRe: How to seal a namespace Pin
Mark Churchill6-Oct-08 6:26
Mark Churchill6-Oct-08 6:26 
GeneralRe: How to seal a namespace Pin
Member 30621766-Oct-08 6:41
Member 30621766-Oct-08 6:41 
GeneralRe: How to seal a namespace Pin
Scott Dorman6-Oct-08 7:01
professionalScott Dorman6-Oct-08 7:01 
AnswerRe: How to seal a namespace Pin
S. Senthil Kumar6-Oct-08 7:00
S. Senthil Kumar6-Oct-08 7: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.