title: Insert to SQL From C# duplicate record error
body: <p>I want to insert into a table that has unique field when users are running.<br>
  Example:</p>
  
  <ul>
  <li>b is unique field.</li>
  <li>In my c# code I'm doing this;</li>
  <li>get_max(b);</li>
  <li>y = b+1;</li>
  <li>insert into table1 (a, b, c, d) values (@x, @y, @z, @t)</li>
  <li>But users are using this table when I want to insert.  So I see duplicate record error for "b" field.</li>
  </ul>
  
  <p>Can I allocate some records before insert or what can I do?</p>