We have a MSSQL 2012 R2 database, which is leading in setting the
primary key to a GUID. We are doing this by giving the primary key
column a default value of newid(). After a row is inserted, the MSSQL
newid function will generate a GUID like,
I will use this GUID for the association to a userobject in the Vault. I
tried all of three retrieval methods, but none of them is working for
By Auto (auto-generated/identity column):
DirXML: [02/15/13 16:22:52.22]: TRACE: BEGIN Get auto-generated primary
key value.
DirXML: [02/15/13 16:22:52.22]: TRACE: RS @ index 1, field 'IdM_GUID',
value = null
DirXML: [02/15/13 16:22:52.22]: TRACE: Closed result set
DirXML: [02/15/13 16:22:52.22]: TRACE: Closed statement

and later:
Unable to retrieve auto-generated primary key value. An illegal primary
key value null was returned at index 1 for column
The documentation shows that this method only works for a MySQL driver
and and MSSQL, so that clear for me.
By Driver (Subscriber-generated):
Conversion failed when converting from a character string to

I think this is correct because this type of SQL-GUID cannot be
retrieved by a SELECT MAX(pk_columname)
and by the None (subscription event), the PK must set in the add event.
So how can I achieve this. Maybe by using MSSQL stored procedures icm
with table-local retrieving

G. Schouten

gschouten32's Profile: https://forums.netiq.com/member.php?userid=2546
View this thread: https://forums.netiq.com/showthread.php?t=46857