G
Guest
I move a step forward, then I have to spend a day on 1 little problem. VS isn't impressing me anymore. I have deadlines to meet and it is just too damn easy to get error pages
Enough of the moan, the mistake is me, I know, but why oh why oh why does this statement not update my SQL Server DB
***
Dim str As Strin
Dim con2 As SqlConnectio
Dim cmdUPDATE As SqlComman
Dim intUpdateCount As Intege
con2 = New SqlConnection("xxxxxxx"
str = "UPDATE ClientDetails SET ContactTitle=@Title, ContactFirstName=@FirstName, ContactLastName=@Surname, Tel=@Tel, HospContactPosition=@Position, Fax=@Fax, Add1=@Add1, Add2=@Add2, Add3=@Add3, Add4=@Add4, PostCode=@PostCode, OrgName=@OrgName WHERE Email='" & stateEmail & "'
cmdUPDATE = New SqlCommand(str, con2
cmdUPDATE.Parameters.Add("@Title", SqlDbType.NVarChar, 50).Value = txtTitle.Tex
cmdUPDATE.Parameters.Add("@FirstName", SqlDbType.NVarChar, 50).Value = Fname.Tex
cmdUPDATE.Parameters.Add("@Surname", SqlDbType.NVarChar, 50).Value = Sname.Tex
cmdUPDATE.Parameters.Add("@Tel", SqlDbType.NVarChar, 50).Value = Tel.Tex
cmdUPDATE.Parameters.Add("@Position", SqlDbType.NVarChar, 50).Value = txtPosition.Tex
cmdUPDATE.Parameters.Add("@Fax", SqlDbType.NVarChar, 50).Value = Fax.Tex
cmdUPDATE.Parameters.Add("@Add1", SqlDbType.NVarChar, 50).Value = Add1.Tex
cmdUPDATE.Parameters.Add("@Add2", SqlDbType.NVarChar, 50).Value = Add2.Tex
cmdUPDATE.Parameters.Add("@Add3", SqlDbType.NVarChar, 50).Value = Add3.Tex
cmdUPDATE.Parameters.Add("@Add4", SqlDbType.NVarChar, 50).Value = Add4.Tex
cmdUPDATE.Parameters.Add("@PostCode", SqlDbType.NVarChar, 10).Value = PostCode.Tex
cmdUPDATE.Parameters.Add("@OrgName", SqlDbType.NVarChar, 50).Value = txtOrgName.Tex
con2.Open(
cmdUPDATE.ExecuteNonQuery(
con2.Close(
Response.Redirect("PersonalDetailsUpdated.aspx"
please please hel
Enough of the moan, the mistake is me, I know, but why oh why oh why does this statement not update my SQL Server DB
***
Dim str As Strin
Dim con2 As SqlConnectio
Dim cmdUPDATE As SqlComman
Dim intUpdateCount As Intege
con2 = New SqlConnection("xxxxxxx"
str = "UPDATE ClientDetails SET ContactTitle=@Title, ContactFirstName=@FirstName, ContactLastName=@Surname, Tel=@Tel, HospContactPosition=@Position, Fax=@Fax, Add1=@Add1, Add2=@Add2, Add3=@Add3, Add4=@Add4, PostCode=@PostCode, OrgName=@OrgName WHERE Email='" & stateEmail & "'
cmdUPDATE = New SqlCommand(str, con2
cmdUPDATE.Parameters.Add("@Title", SqlDbType.NVarChar, 50).Value = txtTitle.Tex
cmdUPDATE.Parameters.Add("@FirstName", SqlDbType.NVarChar, 50).Value = Fname.Tex
cmdUPDATE.Parameters.Add("@Surname", SqlDbType.NVarChar, 50).Value = Sname.Tex
cmdUPDATE.Parameters.Add("@Tel", SqlDbType.NVarChar, 50).Value = Tel.Tex
cmdUPDATE.Parameters.Add("@Position", SqlDbType.NVarChar, 50).Value = txtPosition.Tex
cmdUPDATE.Parameters.Add("@Fax", SqlDbType.NVarChar, 50).Value = Fax.Tex
cmdUPDATE.Parameters.Add("@Add1", SqlDbType.NVarChar, 50).Value = Add1.Tex
cmdUPDATE.Parameters.Add("@Add2", SqlDbType.NVarChar, 50).Value = Add2.Tex
cmdUPDATE.Parameters.Add("@Add3", SqlDbType.NVarChar, 50).Value = Add3.Tex
cmdUPDATE.Parameters.Add("@Add4", SqlDbType.NVarChar, 50).Value = Add4.Tex
cmdUPDATE.Parameters.Add("@PostCode", SqlDbType.NVarChar, 10).Value = PostCode.Tex
cmdUPDATE.Parameters.Add("@OrgName", SqlDbType.NVarChar, 50).Value = txtOrgName.Tex
con2.Open(
cmdUPDATE.ExecuteNonQuery(
con2.Close(
Response.Redirect("PersonalDetailsUpdated.aspx"
please please hel