That loop works fine, but its a little unorthodox for what your trying to accomplish. For loops are generally used when you have a starting and ending condition thats already known ie. subscripting arrays or repeating something a set number of times.
A good loop to use would be something like a while loop:
while( running == 1)
{
// Loop runs forever
dbSync();
}
It's important to note that I placed the dbSync() command inside the loop. This is what 'updates' the screen. That would explain why your getting a black screen.
Edit:
Oh and make sure that the condition in the while loop is true. If running doesn't equal 1 (it's preset to 0) then your loop won't run because the condition isn't true. And if you want the loop to quit when you press the spacebar or something as such, just make running = 0 and the loop will end.