Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Timestamp question...
Message
 
 
To
23/06/2002 18:26:49
Peter Wagner
Point Informática Ltda.
Limeira, Brazil
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
00671505
Message ID:
00671515
Views:
14
Try to specify the field(s) to insert into. Otherwise thre'll be conflict either with Identity or Timestamp column.
INSERT INTO ExampleTable (Name) values('Joe')
>Im made a test to see if something must be different when a SQL table has an Timestamp column.
>So I tryed to INSERT an record from VFP into an table with a timestamp column in SQL.
>
>The table has a simple structure.
>
>CREATE TABLE [dbo].[ExampleTable] (
>	[CODIGO] [int] IDENTITY (1, 1) NOT NULL ,
>	[NAME] [varchar] (30) COLLATE Latin1_General_CI_AS NULL ,
>	[timestamp] [timestamp] NOT NULL
>) ON [PRIMARY]
>
>The code after conection is:
>
>cSQLString = "INSERT INTO ExampleTable values('','Joe')"
>
>But I get this error:
>Disallowed implicit conversion form type varchar to data type timestamp,
>table test.dbo.ExampleTable, column 'timestamp'.
>Use CONVERT function to run this query.
>
>Sorry but I doesnt understand this message.
>I'm not sending a value or string to the timestamp field !!
>I know that I cant update Timestamp columns in SQL, but if I also try
>to Update, and dont pass anything to the column I get an error.
>
>Could please someone explain it.
>How should I handle Insert and Update in tables with timestamp fields
>form a VFP cursor.
>
>Thanks in advance.
>
>Peter
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform