firekiller15
asked on
error received if both field timestamp in a table
I have a table called table A in database and this table has two field
Datatype of this two field is timestamp.
when i try to save this change, error occur why?
Datatype of this two field is timestamp.
when i try to save this change, error occur why?
ASKER
In MSSQL i try to create a table with two field.
both field i have my data type (timestamp). when i try to save my changes
error as attached below occur
error.JPG
both field i have my data type (timestamp). when i try to save my changes
error as attached below occur
error.JPG
ASKER
Note that is also mention
table can only have one timestamp colum why?
table can only have one timestamp colum why?
make sure your query looks like this
"Insert Into TableName (DateColumn) Value ('" & Format(dateVariable, "MM/dd/yyyy") & "')"
"Insert Into TableName (DateColumn) Value ('" & Format(dateVariable, "MM/dd/yyyy") & "')"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i cannot even can create a table because of the datatype problem
that why i post this question on why cannot have two timestamp in one table.
How can i insert value before i create a table
.......
that why i post this question on why cannot have two timestamp in one table.
How can i insert value before i create a table
.......
ASKER
thanks anneshattingal ,
but can you tell me more or do you have any good url that i can read thru' to know more about this.
In sql server what timestamp really do?
but can you tell me more or do you have any good url that i can read thru' to know more about this.
In sql server what timestamp really do?
sorry for my last post. I thought its about DateTime
You cannot have more than one TimeStamp column in a table, since it behaves as a row identifier in the table. Its used for maintining the versioniong of the rows.
You cannot have more than one TimeStamp column in a table, since it behaves as a row identifier in the table. Its used for maintining the versioniong of the rows.
following will give you a correct picture
http://msdn2.microsoft.com/en-us/library/ms182776.aspx
http://msdn2.microsoft.com/en-us/library/ms182776.aspx
ASKER
in http://msdn2.microsoft.com/en-us/library/ms182776.aspx what is
version-stamping table rows mean
version-stamping table rows mean
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>version-stamping table rows mean
The values on the 'timestamp' column will automatically get updated whenever you change a value on that particular row. You cannot explicity mention a value on that column, sql serve internally handles this
The values on the 'timestamp' column will automatically get updated whenever you change a value on that particular row. You cannot explicity mention a value on that column, sql serve internally handles this
and it generates based on the current date & time.. most importantly it is suppose to be unique in the database
can you tell me the exact error message ? also i assume that those are datetime columns, whenever you enter the date enter it in this YYYY-mm-DD format
GOD BLESS,
Aneesh R.