I have problem with iserted record to MSSQL 2005.
in SQL server :
---------
Column Name - ROWGUID
DateType - uniqueidentifier
in Delphi code:
--------
ZTable1.Insert;
ZTable1.FieldByName('SURNAME');
ZTable1.Post;
..... I can´t fill column ROWGUID
->
---------------------------
Error!
---------------------------
Conversion failed when converting from a character string to uniqueidentifier
---------------------------
OK
---------------------------
Why?
Conversion failed when converting from a character string to
Moderators: gto, EgonHugeist
Normaly the value for a uniqueidentifier is generated bij de server.
This can be done in a trigger, setting the default value for the field to newid().
Have you added persistent fields to the table component?
In that case Delphi will fill the field with something like '' (empty string).
And the default of the server is not used.
Why don't you use a Query component?
Then you just don't select the column, and the server will do de rest.
J.W. de Bokx
This can be done in a trigger, setting the default value for the field to newid().
Have you added persistent fields to the table component?
In that case Delphi will fill the field with something like '' (empty string).
And the default of the server is not used.
Why don't you use a Query component?
Then you just don't select the column, and the server will do de rest.
J.W. de Bokx