Link to home
Start Free TrialLog in
Avatar of onaled777
onaled777Flag for United States of America

asked on

Insert not inserting the correct value

I have a working knowledge of SQL Server, but I am not an expert.  I wonder if you could give me reasons for a strange observed behavior.

I do a simple insert on a table as shown in the codebase below.  Notice the Archived is to be set to one. When I run the query however, and then do a select to see the result, the Archived is set to 0 in the database.

What are some possbile reasons for this?
INSERT INTO PG
					(
						pgtypeid
						, pgstatusid
						, websiteid
						, description
						, url
						, landingpgflag
						, formsubmissionflag
						, luby
						, lu
						, disabled_ind
						, Archived
				)VALUES(
						2
						, 5
						, 18
						, 'Description'
						, 'PageName'
						, 1
						, 1
						, 'Team'
						, GetDate()
						, 0
						, 1
					)

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of RiteshShah
RiteshShah
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of onaled777

ASKER

Thanks RiteshShah
I am pretty sure no one modified, since I am the only one working in this database at the moment, but is a trigger the only thing that could trigger it?  Could there be a configuration on the table, or a constraint that could be set that only allows a certain value? Just asking, I will award the points regardless.
you can see whether any trigger defined on that table or not with the help of following link from my blog.

http://www.sqlhub.com/2010/01/spdepends-is-very-useful-stored.html

all the dependent object of the table you will get from the two ways defined on above link