Hi
I am making a few assumptions here, they are:
Your table is called LOG_TABLE
You have a primary key field named 'id'.
Replace thje above with your actual field/tablenames
The following statement will delete the oldest (as per ID field, just order by a different field if you determine which record to delete by a date for example)
delete from LOG_TABLE
WHERE id in (
select top 100 id from LOG_TABLE
ORDER BY 1)
AND (select count(*) from LOG_TABLE)>1000
It would help if I could see the actual table schema (structure) to make sure the query is right for you, but hopefully rhe above will steer you in the right direction. Feel free to send it to me, or post it here.
You will need to run this DELETE periodically from your vb.net app, perhaps after each insert, or a group of inserts into the table.