I need some help. I am very frustrated because I keep on getting the following error message when I try to update information:
Microsoft OLE DB Provider for SQL Server error '80040e21'
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
/UpdateCity.asp, line 48
I don't have this problem with Access. Can someone tell me how I can fix my code to make sure that it will allow me to update certain information as much as I want to?
Here's my code:
'----------------------------------------------------------- --
' name: UpdateRecord()
' description: Update the record
' note: This converts all empty strings to Null values
'----------------------------------------------------------- ---
Sub UpdateRecord()
'Get values for new record
AreaName = Request.Form("selArea")
City = Request.Form("txtCity")
State = Request.Form("txtState")
'Fill in recordset field values, while converting all
'empty strings to Null values
rs("AreaID") = ConvertEmptyToNull(AreaName)
rs("City") = ConvertEmptyToNull(City)
rs("State") = ConvertEmptyToNull(State)
'Save the record to the database
rs.Update
End Sub
' ------------------------------------------------------------ ----
' name: ConvertEmptyToNull(theString)
' description: Converts empty strings to NULL to save those values
' to a database.
' returns: NULL if the string passed in is empty
' the original string if it was not empty
' ------------------------------------------------------------ -----
Function ConvertEmptyToNull(theString)
dim convertedString
If theString = "" then
convertedString = Null
Else
 |