Home All Groups Group Topic Archive Search About
Author
1 Sep 2006 2:00 AM
Sonu.NET
txtAssoZip.Text = "Some Data"
txtZip.Text = "Some Data"

Dim strConn As String = "Server Connection"
Dim str As String = "Update ZipLookup SET AssociatedZips=@AssoZip where
Zip=@Zip"
Dim cmd As New SqlCommand(str, New SqlConnection(strConn))

cmd.Parameters.AddWithValue("@AssoZip", txtAssoZip.Text)
cmd.Parameters.AddWithValue("@Zip", txtZip.Text)

cmd.Connection.Open()
cmd.ExecuteNonQuery()
Response.Write(str)

What I am doing wrong here? It is not giving me anything .. Here is what I
get as an output
Update Table1 SET AssociatedZips=@AssoZip where Zip=@Zip

Any help would be great!

Thanks,
SK