string insertCommand =
"INSERT INTO Users (UserID) VALUES" + "" + "(CONVERT(uniqueidentifier, '" +
UsersIdentityToinsert + "'),'"+ userName+",0,null')";
it tells me:
There are fewer columns in the INSERT statement than values specifiedin the VALUES clause. The number of
values in the VALUES clause must match
the number of columns specified in the
INSERT statement.
But i have four columns?
you only have UserID in the insert list but in the value list, you have two values – a uniqueidentifier and a username
this would work better: (assuming the name of your username column)
EDIT:
I feel i need to address this part a bit more clearly:
The error you received refers to the number of columns specified in the INSERT statement – not the actual table so if you start an INSERT with:
you need to match the number of columns here in your VALUES clause