5 pts.
 How to save data back to databse from radio button? SQL Server 2005
I am using 4 radio button, what so ever radio button I select, so how data revert back to database, I am doing this in asp.net 3.5 using sql server 2005

Software/Hardware used:
Asp.net 3.5
ASKED: Apr 23, 2010  9:11 PM GMT
UPDATED: April 26, 2010  12:20:33 AM GMT
60,255 pts.

Answer Wiki:
The question is not clear enough.

In summary, you would have to:

-Import the SqlClient namespace:

Imports System.Data.SqlClient


-Connect to the database:

        Dim conn As SqlConnection
Dim command As SqlCommand
conn.ConnectionString = "Data Source=<your_database_server>;Initial Catalog=<your_database>;User ID=<your_user>;Password=<your_password>"
conn.Open()


-Execute an insert command:

            command.CommandText = "INSERT INTO <your_table> VALUES (<your,values>)"
command.Connection = conn
iRowsAffected = command.ExecuteNonQuery


-Close the connection:

            conn.Close()


Please provide more details if you need further help.

-CarlosDL

--------------
Last Wiki Answer Submitted:  Apr 23, 2010  9:41 PM (GMT)  by  Carlosdl   60,255 pts.
To see other answers submitted to the Answer Wiki View Answer History.
Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _