I think my thread title is a bit incomplete. coz these are my questions.I need answers to these questions for the completion of my thesis. I Know this is sort of a long message but im detailing the situation for better understanding of my questions.
And because these thread is pretty long and I have many questions,I hope I dont look like a lazy of something.Im doing my best but i still need help.
Im using Visual c# 2008 pro,sql server 2005.using a xp sp3 OS with 512 RAM
lets say i have a form with a button that inserts a data in my database. when i run my program,press the button,it says that i successfully added my data.when I check my database,I cant see the data I added.
Q.1.] Why is that so?Do I need to save the database first to "commit" my changes?
With the same form,but now i have a datagridview in my form. when i click the button that adds a data in my database,i need the dataGridView to automatically reflect my changes without clicking any other control.Ive been able to display the changes of a table in a dataGridView but only after 'refilling' the dataGridView.
Q.2.a] is there a function in sql server that 'refreshes' the database instantly/automatically?meaning is it instantly/automatically displays the changes made to a table?
Q.2.b] is there a function that instantly/automatically refresh a dataGridView (or any other control) that is connected to a updated table?
In manipulating my database i used the following:
SqlConnection = for connection
SqlDataAdapter = for SELECT queries
SqlCommand = for INSERT,UPDATE,DELETE queries
DataTable = to store my result table
Q.3]Am I doing this right? or there are better way to 'manipulate' the database?Ive read some codes that uses a dataSet instead of DataTable but I dont know the difference so I decided to ask.I hope you can help.
Lastly,My program must communicate with a minimum of 2 PCs with one server.Im Thinking of the database will be on the server only and all other PCs will only connect to it.like client/server connection.Is that the best way to do the job?If it is-
Q.4]how can i connect to the database from a PC(maybe a client) to another PC(a server) using C# and Sql server 2005. what hardware do i need?
I hope you understands my problem and reply to this thread any time. coz my thesis is due 2 weeks from now so I think I will tentatively forget sleeping for 2 weeks
For your answers,any help, or if you need more detail or a source code,please reply to this post.
I truly appreciate when you reach this part of my thread coz i know that you've read it.
thank you very much in what ever help you can give me.even by simply replying "GoodLuck" will help
thanks again and Godbless!