We still validate the state name and abbreviation to ensure that we do not allow empty fields to be inserted, or that the data is not longer than what the database can handle.
Some may wonder why we do not validate the state ID.
Execute str SQL 'Return with a good return code Update State = 0 'Dereference the database objects Set obj Err = Nothing 'All was successful, exit function On Error Go To 0 Exit Function 0 Then 'Get the first error in the errors collection Set obj Err = obj Conn.
Errors(0) 'Set the error message str Error = obj Err.
Thanks for the reply :) I might have found a workaround, and that's by migrating everything from a MDB project into an ADP project.The routine and stored procedure run successfully (i.e.without returning any error code) but the field is not updated. Using an unchanged and well tested VB routine for 'poking' an SQL Server stored procedure, I have run a new stored procedure that has to update a single 'bit' type field in my database.VB does not have the 'bit' field type so I pass the 1 or 0 value in a smallint field and convert it within the stored procedure.