Start by looking at your tables: Do you have a table called "V01_PR_RAILDOCS"? Then make sure that your tables contains the columns "ID" and "PRONO" - should the second one be "PROMO"?
I'd suggest that probably you need a JOIN rather than refer to two tables in teh same SELECT:
string fstring = "SELECT COUNT(d.ID) AS reccnt FROM [dbo].[V01_PR_RAILDOCS] d JOIN [dbo].[V01_PG_RAILDOCS] s ON s.ID=d.ID WHERE d.ID > 104770 AND s.PRONO='ABKET'";
And why are you looping? You will only return one record (since it's a count) so your code should reflect that with an
if
rather than a
while