I don't have access to my old code, so I can't give you an example, but it is not very complicated if you use the documentation. As far as checking to make sure it connected, just test the return code from the db_connect().
And - please do not attempt to raise the importance of your question by the use of "asap." EVERYONE's problem is important, but we are all unpaid volunteers, and we are not motivated by your schedule (or lack of one).
creating a DSN can be done via the OS controls and not truely within WinRunner. You can create this, and test the connection outside of WinRunner, then just bring it to WinRunner as needed.
From that point, just follow Peter's advice and perform a simple SQL statment on th edatabase connection and evaluate the return code. If you get E_OK, then you are set. Other than that it may all fall into how you consruct your queries to ensure the information you obtain is what you expect.
Insanity: doing the same thing over and over again and expecting different results