bananna bananna - 4 years ago 144 Question

how to insert values in an sql table with uniqueidentifier column using vb?

I have a column with

uniqueidentifier, rowguidcol, not null, PK, default, and newsequentialid()
in a table. And I'm using VB to insert values in it, but i just can't.

error message

I tried adding columns but it still wont. This is my first time using
since I've only used identity. So please help me.

Is there something i need to do that I don't know.? Thank you.

Answer Source

Use NEWID() when inserting into a UniqueIdentifier column. Something like :

INSERT INTO (UniqueIdentifierColumn,Name,Age) VALUES (NEWID(),'Banana','20')

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download