The answer you are looking for can be a bit detailed. You will need to use the OCI(Oracle Call Interface). The best thing is to just point you in the right direction. You should find everything you need here:

http://crlab.com/ocl/

David