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

C#

 
Questioncheckedlistbox - save checked items for future run Pin
havejeet10-Jun-09 3:50
havejeet10-Jun-09 3:50 
AnswerRe: checkedlistbox - save checked items for future run Pin
Manas Bhardwaj10-Jun-09 3:51
professionalManas Bhardwaj10-Jun-09 3:51 
AnswerRe: checkedlistbox - save checked items for future run Pin
Rajesh R Subramanian10-Jun-09 4:01
professionalRajesh R Subramanian10-Jun-09 4:01 
Questiontaking null instead of value Pin
KIDYA10-Jun-09 3:01
KIDYA10-Jun-09 3:01 
AnswerRe: taking null instead of value Pin
Tom Deketelaere10-Jun-09 3:05
professionalTom Deketelaere10-Jun-09 3:05 
AnswerRe: taking null instead of value Pin
Colin Angus Mackay10-Jun-09 5:04
Colin Angus Mackay10-Jun-09 5:04 
GeneralRe: taking null instead of value Pin
KIDYA11-Jun-09 18:35
KIDYA11-Jun-09 18:35 
QuestionSQL Database is not saved after data inserted!! Pin
Zohair8310-Jun-09 2:25
Zohair8310-Jun-09 2:25 
Hi there,

I'm building a windows application using Visual Studio 2005.
1- I built the GUI and the database table needed.
2- I biult a SQL table with the fields needed.
3- I used the VS2005 wizards to establish connection and to create the dataset and table adapter.
4- I added a gridView to the form bound to the defalut data source enerated by VS.
5- I added a button with this code inside the click method:
/////////////////////////////////////////////////////////////////////
surveyTableAdapter.Insert(q1.ToString(), q2.ToString(), q3.ToString(), q4.ToString(),
q5.ToString(), q6.ToString(), q7.ToString(), q8.ToString(), name.Text, email.Text,
phone.Text, address.Text, post.Text, comments.Text, mailList.Checked.ToString());

this.surveyTableAdapter.Fill(this.surveyDataSet.Survey);//this is to populate the gridview upon a click

MessageBox.Show("Thank you for your participation in this servey.");
/////////////////////////////////////////////////////////////////////
6- The problem is that when I click the button I see the changes in the gridview, but when the program is re-executed, nothing is found in the table.In other words, changes are not saved.

7- I built a MS-Access database and connected it to the GUI, but the same thing happened.

I want to reiterate that i'm using the default cod and settings of the VS2005.

Can anybody help me in that?

Thanks in advance.

Zohair
AnswerRe: SQL Database is not saved after data inserted!! Pin
EliottA10-Jun-09 2:57
EliottA10-Jun-09 2:57 
GeneralRe: SQL Database is not saved after data inserted!! Pin
Zohair8310-Jun-09 3:26
Zohair8310-Jun-09 3:26 
AnswerRe: SQL Database is not saved after data inserted!! Pin
DaveyM6910-Jun-09 3:33
professionalDaveyM6910-Jun-09 3:33 
GeneralRe: SQL Database is not saved after data inserted!! Pin
Zohair8310-Jun-09 6:05
Zohair8310-Jun-09 6:05 
GeneralRe: SQL Database is not saved after data inserted!! Pin
DaveyM6910-Jun-09 6:11
professionalDaveyM6910-Jun-09 6:11 
QuestionCom Port [modified] Pin
sahu.shikha10-Jun-09 2:09
sahu.shikha10-Jun-09 2:09 
AnswerRe: Com Port Pin
Manas Bhardwaj10-Jun-09 2:23
professionalManas Bhardwaj10-Jun-09 2:23 
AnswerRe: Com Port Pin
Luc Pattyn10-Jun-09 2:33
sitebuilderLuc Pattyn10-Jun-09 2:33 
Questionproblem with logic Pin
tasumisra10-Jun-09 1:28
tasumisra10-Jun-09 1:28 
AnswerRe: problem with logic Pin
Manas Bhardwaj10-Jun-09 1:43
professionalManas Bhardwaj10-Jun-09 1:43 
GeneralRe: problem with logic Pin
tasumisra10-Jun-09 1:56
tasumisra10-Jun-09 1:56 
GeneralRe: problem with logic Pin
tasumisra10-Jun-09 2:38
tasumisra10-Jun-09 2:38 
AnswerRe: problem with logic Pin
Ennis Ray Lynch, Jr.10-Jun-09 4:15
Ennis Ray Lynch, Jr.10-Jun-09 4:15 
GeneralRe: problem with logic Pin
tasumisra10-Jun-09 5:42
tasumisra10-Jun-09 5:42 
QuestionHooking messages of external application Pin
Muneeb Abdul Shakoor10-Jun-09 1:21
Muneeb Abdul Shakoor10-Jun-09 1:21 
AnswerRe: Hooking messages of external application Pin
Pete O'Hanlon10-Jun-09 1:28
subeditorPete O'Hanlon10-Jun-09 1:28 
RantRe: Hooking messages of external application Pin
Rajesh R Subramanian10-Jun-09 1:43
professionalRajesh R Subramanian10-Jun-09 1:43 

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.