The orbit is a parametrized function in 3D space (or 2D space if you have 2D app). This function is something like
x = function1(t);
y = function2(t);
z = function3(t);
where x, y, and z are possible coordinate of planet from parameter t (t actually can be time but not necessarily so). So the orbit is a set of x(t), y(t) z(t).
In the simplest case of circular orbit around point 0,0 in z-plane those functions can be:
x = R*cos(t);
y = R*sin(t);
z = 0;
where R is the orbit radius. You function will be more complex, to account for shifts, rotations and may be elliptical orbits.
What you have to do, in general case, is to run t from 0 to 2pi and draw a short lines using dbLine. Something like
float t=0.0; float dt=0.01; float R=50.0;
float x1 = R*dbCOS(t); float y1=R*dbSIN(t);
do{
t = t+dt;
x2 = R*dbCOS(t); y2=R*dbSIN(t);
dbLine(x1, y1, x2, y2);
x1=x2; y1=y2;
} while (t<2.0*3.1416)