25 pts.
 ASP.NET
i have four textboxes abd a database whicjh is already created. what i want to do is if i enter the value in the four textboxes and press button it should automatically gets updated or saved in the database.

Software/Hardware used:
visual studio web developer 2008
ASKED: March 10, 2010  4:52 PM
UPDATED: March 10, 2010  5:35 PM

Answer Wiki:
You will need the SqlClient namespace: <pre>Imports System.Data.SqlClient</pre> You will also need <a href="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.aspx">SqlConnection</a> and <a href="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.aspx">SqlCommand</a> objects. Your connection string would be something like this: "Data Source=YourDatabaseServer;Initial Catalog=YourDatabase;User ID=YourDatabaseUser;Password=YourPassword" In summary: -Declare and instantiate your SqlConnection and SqlCommand objects -Assign the appropriate connection string to the SqlConnection -Assign the connection and the appropriate SQL command text to the SqlCommand -Open the SqlConnection -Execute the SqlCommand -Close the SqlConnection Happy coding !
Last Wiki Answer Submitted:  March 10, 2010  5:35 pm  by  carlosdl   63,535 pts.
All Answer Wiki Contributors:  carlosdl   63,535 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _