Solved

Timestamp in Visio

Posted on 2004-03-20
7
1,861 Views
Last Modified: 2007-12-19
I have a timestamp column in SQLServer... While designing in Visio I dont have timestamp column ....How can I assign a timestamp datatype in visio???
0
Comment
Question by:sainavya1215
  • 4
  • 3
7 Comments
 
LVL 50

Accepted Solution

by:
Lowfatspread earned 125 total points
ID: 10643283
Don't know

does visio support a rowversion datatype in which case that what an MS SQL Timestamp really is


otherwise  you'd need to create your own type which implemented as an 8byte "rowversion"

from SQL 2000 onwards Miscrosofts advice is to use rowversion instead of timestamp as they intend to align Timestamp with datetime
as per the ANSI 92 standard..

hth
0
 

Author Comment

by:sainavya1215
ID: 10643318
There is nothing such as rowVersion dataType  in  Visio.... I DINT FIND IT IN SQLSERVER2000 Too...

1) How can i use rowversion in sql server2000
2)How can I create a new datatype in visio of rowversion type when rowversion doesnot exist?
0
 
LVL 50

Assisted Solution

by:Lowfatspread
Lowfatspread earned 125 total points
ID: 10643332
from SQL 2000 BOL

search rowversion links to TIMESTAMP


timestamp
timestamp is a  data type that exposes automatically generated binary numbers, which are guaranteed to be unique within a database. timestamp is used typically as a mechanism for version-stamping table rows. The storage size is 8 bytes.

Remarks
The Transact-SQL timestamp data type is not the same as the timestamp data type defined in the SQL-92 standard. The SQL-92 timestamp data type is equivalent to the Transact-SQL datetime data type.

A future release of Microsoft® SQL Server™ may modify the behavior of the Transact-SQL timestamp data type to align it with the behavior defined in the standard. At that time, the current timestamp data type will be replaced with a rowversion data type.

Microsoft® SQL Server™ 2000 introduces a rowversion synonym for the timestamp data type. Use rowversion instead of timestamp wherever possible in DDL statements. rowversion is subject to the behaviors of data type synonyms. For more information, see Data Type Synonyms.

In a CREATE TABLE or ALTER TABLE statement, you do not have to supply a column name for the timestamp data type:

CREATE TABLE ExampleTable (PriKey int PRIMARY KEY, timestamp)

If you do not supply a column name, SQL Server generates a column name of timestamp. The rowversion data type synonym does not follow this behavior. You must supply a column name when you specify rowversion.

A table can have only one timestamp column. The value in the timestamp column is updated every time a row containing a timestamp column is inserted or updated. This property makes a timestamp column a poor candidate for keys, especially primary keys. Any update made to the row changes the timestamp value, thereby changing the key value. If the column is in a primary key, the old key value is no longer valid, and foreign keys referencing the old value are no longer valid. If the table is referenced in a dynamic cursor, all updates change the position of the rows in the cursor. If the column is in an index key, all updates to the data row also generate updates of the index.

A nonnullable timestamp column is semantically equivalent to a binary(8) column. A nullable timestamp column is semantically equivalent to a varbinary(8) column.

0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 50

Expert Comment

by:Lowfatspread
ID: 10643342
have you tried reverse engineering a table containing a timestamp column into visio to see what it does with it?

my long term suggestion though would be to use a proper database modelling tool not an overgrown flowchart drawing tool..
0
 

Author Comment

by:sainavya1215
ID: 10643349
Thanks a lot for the info provided...
0
 

Author Comment

by:sainavya1215
ID: 10643383
Hi Low,

I did reverse engineer a table from SQL Server ...Now it worked .... I can see the SQL Server dataTypes and it populated Timestamp field with timestamp column.

This means that we have to first have the tables in sqlserver and then use this tool...
0
 

Author Comment

by:sainavya1215
ID: 10644451
Hi low No answer from you after u posted ur last question regarding 3 tables referential integrity quesiton.........whats wrong???
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In this article—a derivative of my DaytaBase.org blog post (http://daytabase.org/2011/06/18/what-week-is-it/)—I will explore a few different perspectives on which week today's date falls within using Microsoft SQL Server. First, to frame this stu…
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now