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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

updates the next column

Status
Not open for further replies.

indoaryaan

IS-IT--Management
Nov 19, 2003
26
US
I am using a SP to update a nText column. The update is fine. The next column is a DateTime column..and in few cases the datetime col gets updated to NULL. The SP does not touch the DateTime col at all. I have looked for any triggers being fired..but none seem to exist. I have run trace to check the code being executed...that looks fine too. No code touches the Datetime col. Is there anything i can do to find out what causes the upddate to NULL. Any help would be appeciated. Thanks.....
 
The table may be set up to have nulls on that column.

Thanks

J. Kusch
 
Maybe the table was created with a DEFAULT of NULL for that column. For example:


CREATE TABLE mytable
MyDate DATETIME DEFAULT NULL

-SQLBill
 
If the above doesn't answer the problem, how about the application? Are you using VB 6 with a connected recordset?
-Karl
 
i have checked for defaults...none there. No i am not using VB...i have to do this in SQL. Is there a way i can capture the command / command name which kicks in the trigger / update ???
 
You could try to capture the transaction using Profiler. When setting up the trace, select Stored Procedures: SP:StmtStarting and SP:StmtCompleted, also TSQL: StmtStarting, StmtCompleted. I believe those will give you the actual statements being run. Add some of the auditing information such as logins, logouts, etc. Then filter on the database.

-SQLBill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top