I don't work with Base, but I can point you to some basic documentation. The official reference for the API is at http://api.openoffice.org/
. Click on the IDL reference link under Developer's Guide on the left. The Developers Guide, listed under "Browse API related Documentation Online" is full of information, though the examples are mostly in JAVA.
I found both of these took some getting used to.
Andrew Pitonyak has written very useful documents for Macros. He has a web page that includes a document dedicated to database access. I think the link ishttp://www.pitonyak.org/database/AndrewBase.odt
The XRay tool is indispensable for writing macros. It tells you the properties, methods, and services for any object and will bring up the API reference if you down load the SDK. It is at this link: http://ooomacros.org/dev.php#101416
I hope that can get you started. For specific questions, the people on this forum are very helpful.