Raps, The simplest solution to what you seem to be trying to do is to use a midi sequencer like cakewalk or cubase for instance, or some freebie you can find and get the cable from any music store which will connect your soundcard to any midi device, it's just called a midi breakout cable and is actually quite easy to make yourself.
If you try various voices/patches in your sequencer you'll find some of them will activate a mmc (midi machine control) lighting rig. Once you decode that logic you could just generate a library of midi files which switch the patterns on/off in the ways you want and run those midi files from DB.
No .dll required

[edit]
If you find each sysex control protocol for your particular rig, (you should be able to find the data for it on the net somewhere if you don't have the manual) You can make single note midi files, and load them all into your db prog. Then you could trigger them individually, instead of in preset patterns.
But the question is whether you need a db program at all, when if you just want to control a mmc lighting rig all you need is a sequencer.
If you want to syncronize graphics/audio etc to it though I reckon the above method would work a treat
ZX Spectrum 48k Issue 3, Radio shack Tape drive, Rank arena 12" T.V. set.