title: SELECT @@ IDENTITY using SQL Server CE from C# code
body: <p>Im using Data Adapter/Set in SQL CE, i do create the following query to insert into table and then SELECT @@IDENTITY,
  I want this SELECT statement return me the Student ID each time after Inserting into table, here is my Query:</p>
  
  <pre><code>INSERT INTO [Student] ([Name], [Family], [Address], [Phonenumber])
  VALUES(@Name,@Family,@Address,@Phonenumber);
  SELECT  @@IDENTITY;
  </code></pre>
  
  <p>here is how i call query:</p>
  
  <pre><code>int x = da.Insert("Albert", "Alexandra", "No4.Oxford", Telnum);
  </code></pre>
  
  <p>Int x suppose to return me ID...</p>
  
  <p>Here is the Error im getting :</p>
  
  <blockquote>
    <p>There was an error parsing the query. [ Token line number = 4,Token line offset = 1,Token in error = SELECT ]</p>
  </blockquote>
  
  <p>Insert Query it self it works but once adding <code>SELECT @@ IDENTITY</code> at the end im getting error.</p>
  
  <p>I really don't know what i'm doing wrong.</p>