Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Timestamp in Visio

Posted on 2004-03-20
7
1,908 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

829 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