I'm not sure what RowCount has to do with the record you just inserted - if you inserted it you know how many of it there is...
But to get the RowCount in SqlCE is as easy as it is in MsSql:
SELECT COUNT(*) FROM MyTable
If this isn't what you are after, what is the problem you are having, exactly?
":). Yah, its really angry me.
I tried Top at first but, The SQL CE 3.0 does not support "Top" function :(
I use this code:
define @a = 20 --@a is a variable ;)
if(SELECT COUNT(*) FROM table WHERE id BETWEEN 10 AND a<10)
{
-- @a++
}
But there is a problem. How to make a loop in SQL?"
I had forgotten that TOP was introduced in V3.5! :O
To be honest, I'm not sure I would bother.
Bearing in mind that SQLCE is single user, and all the resources used are local to your PC (or other equipment), it makes no odds particularly if you retrieve all the records and filter them locally. Or at least retrieve all the IDs into an array and then request just the relevant records. (SQLCE is not very efficient when it comes to complex queries at the best of times)
What are you trying to use the DB on?