how to add Guid in Primary Key automatically, in "Replication ID"field size type?

  • Thread starter Thread starter Omer kamal
  • Start date Start date
O

Omer kamal

When in database(.mdb) the primary key have fields size type
"Replication ID" it creates Guid.

I tried to create string of Guid and insert it but did it not work.

Control.databindings.add(), Method for this field is only working one
way that,it is not saving back the data into table.

I wonder if there is some way so it creat automatic Guid when I add new
field?

I notice in Long integer "field size" type it does itself but not in
Guid (Replication ID) case.



Regards,
omer kamal
 
Omer kamal said:
When in database(.mdb) the primary key have fields size type
"Replication ID" it creates Guid.

I tried to create string of Guid and insert it but did it not work.

Insert the Guid as a string enclosed in {} (e.g. '{guid_string}').

To have SQL Server automatically generate a Guid when you insert a row, set
the default value for the column to "(newid())".
 
Back
Top