How to save data back to databse from radio button? SQL Server 2005

5 pts.
Tags:
ASP.NET
Database issues
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

Answer Wiki

Thanks. We'll let you know when a new response is added.

The question is not clear enough.

In summary, you would have to:

-Import the SqlClient namespace:

<pre>Imports System.Data.SqlClient</pre>

-Connect to the database:

<pre> 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()
</pre>

-Execute an insert command:

<pre> command.CommandText = “INSERT INTO <your_table> VALUES (<your,values>)”
command.Connection = conn
iRowsAffected = command.ExecuteNonQuery</pre>

-Close the connection:

<pre> conn.Close()
</pre>

Please provide more details if you need further help.

-CarlosDL

————–

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: