Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Audit Trails in SQL Server 2000

Status
Not open for further replies.

DaveJunior

Programmer
Jan 7, 2003
11
GB
I have to write an audit trail for one of my tables. Some of the fields are text fields and it isn't letting me do the audit trail - it keeps on giving me the error message:

Cannot use text, ntext, or image columns in the 'inserted' and 'deleted' tables.

Any ideas as I cannot find anything out about it...
 
I assume you are using a trigger on the table to write the old value(s) of one or more columns into an audit table?

If this is the case then no, the values of any text or image columns won't appear in the deleted table.

Is it the text column you are particularly interested in? If so you may have to write the logic for inserting an audit row into your application code or stored procedure. If not then just write the other columns to your audit table and ignore the text cols.

(BTW, this may have been better posted in the SQL Server forum rather than ANSI SQL forum)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top