Delete the data from tabel in the database

G

Guest

Hi EveryBody:

I made project by using Asp.Net 2.0 and the code behind is written by vb.net

I want to delete the old password from the database tabel and insert the new
password insted ?

My queruy for retriveing information from the data base is :

Dim cmd As SqlCommand
Dim scon As SqlConnection = New
SqlConnection(ConnectionStrings("HusamConnectionString").ConnectionString)
Dim sql As String
scon.Open()
sql = "SELECT
user_Name,user_Password,user_Email,user_Squestion,user_Sanswer FROM husam_Tab"
cmd = New SqlCommand(sql, scon)
cmd.ExecuteNonQuery()
Dim myReader As SqlDataReader = cmd.ExecuteReader()
While (myReader.Read())
rawan.Add(myReader.GetString(0))
rawan1.Add(myReader.GetString(1))
rawan2.Add(myReader.GetString(2))
rawan3.Add(myReader.GetString(3))
rawan4.Add(myReader.GetString(4))
End While
myReader.Close()
scon.Close()

So any help or redirection will be appreciated

regard's

Husam
 
C

Cor Ligthert [MVP]

Husam,

This is much simpler with a datatable, have a look for it in the
documentation on MSDN.
You need the Update and the Commandbuilder

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top