Dumb question, I'm sure, but I'm asking it anyway 
I want to update a record in my SQL database based on the variables that are passed to the function.
Here's my function:
Public Function UpdateInfo(ByVal intID as Integer, ByVal strSuic as String, ByVal strOuic as String, ByVal strAns as String)
Dim updateSQL as String = "update ordertbl set suic = " & strSuic & ", ouic = " & strOuic & ", answers = " & strAns & "where orderid = " & intID
Dim myConn as SqlConnection = New SqlConnection(ConfigurationSettings.AppSettings("ConnectionString"
)
Dim myComm as SqlCommand = New SqlCommand(updateSQL, myConn)
myConn.Open()
Dim myDR as SqlDataReader = myComm.ExecuteReader(CommandBehavior.CloseConnection)
myDR.Read()
End Function
It's not updating the record - I'm not getting an error or anything, it's just not updating.
Any help would be greatly appreciated.
Thanks
suzanne
I want to update a record in my SQL database based on the variables that are passed to the function.
Here's my function:
Public Function UpdateInfo(ByVal intID as Integer, ByVal strSuic as String, ByVal strOuic as String, ByVal strAns as String)
Dim updateSQL as String = "update ordertbl set suic = " & strSuic & ", ouic = " & strOuic & ", answers = " & strAns & "where orderid = " & intID
Dim myConn as SqlConnection = New SqlConnection(ConfigurationSettings.AppSettings("ConnectionString"
Dim myComm as SqlCommand = New SqlCommand(updateSQL, myConn)
myConn.Open()
Dim myDR as SqlDataReader = myComm.ExecuteReader(CommandBehavior.CloseConnection)
myDR.Read()
End Function
It's not updating the record - I'm not getting an error or anything, it's just not updating.
Any help would be greatly appreciated.
Thanks
suzanne