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