1 Reply Latest reply: Aug 9, 2013 4:29 PM by John Lifter RSS

    Populate a sql timestamp column.

      I have a column in one of my SQL database tables named DateModified - it is of type timestamp.

      I am getting an error writing the record no matter what I do.

       

      Also in the schema created from the table, changes it the type to byte.

       

      I am writing a archive record and really just want to entire record copied to an archive database table with the same schema.

      I don't really care if the value is the same as the input field or the current date I just need to know how to populate this field.

       

      I get this error no matter what I do.

       

      "Microsoft SQL Server]Cannot insert an explicit value into a timestamp column. Use INSERT with a column list to exclude the timestamp column, or insert a DEFAULT into the timestamp column. Error in parameter 46."

       

      Thanks Traci

        • Re: Populate a sql timestamp column.

          The timestamp type has nothing to do with date or time values.  It is simply an incrementing number that can be used to determine if a row has been altered since it was last read.  Byte is the correct Expressor type for this column type.

           

          If you want to store a date or time value, you should use the MSSQL datetime or time type.  These column types will correspond to an Expressor datetime type.