You will have to create auto increment columns in the database, and don't attempt to set them from a client application. Don't even try to update the primary key.
By the way: Why are you using binary? In MySQL you usually use serial which is shorthand for "longint unique auto_increment not null" or similar.
But I am using Microsoft SQL Server. And in case I am using binary, I dont have an option for auto incrementing it (i.e. through IDENTITY function in Microsoft SQL Server) available for binary data. They are available only for integers.