Have a look at IBM's AP127 documentation http://www-01.ibm.com/software/awdtools/apl/library.html
See APL2 Programming: Using Structured Query Language (PDF) SH21-1057-07, it's the 4th from the bottom. I wouldn't recommend building anything like this today, but it would be possibly instructive to have a look at this 30 year old approach. Interestingly, AP127 worked as a shared variable processor in a flat (that is, no namespace, but with nested arrays) APL system. In the 1980s, this was the only thing going. IBM APL2 had it, as well as Sharp APL, both mainframe systems. In the mid 1990s, some company built a version for Dyalog and Windows ODBC. Interestingly also, this product was also implemented as a shared variable processor but used Windoze Dynamic Data Exchange (DDE) to pass information back and forth. This product was made redundant when Windows DAO and ADO came along. DAO (mostly for MS Access) and ADO (ODBC) worked very well with Dyalog APL (and probably APL2000, though I never used it). Also, Dyalog has a ODBC interface (I think it's called SQLink) which comes with Dyalog APL and is available with APL2000. As far as I know, this product also works with Unix and Linux. Some years ago, ADO did not connect very well with IBM DB2 on a mainframe (possibly some vendor rivalry here) but SQLink worked properly. Today, if I were using Windoze, my choice would be to use ADO, which is similar to program across APL, Visual Basic (VBA), and Windows Scripting Host. Visual Basic .Net has ADO.Net, something completely different, and in my meager opinion, much less usable. In summary: - AP127, for mainframe APL and IBM APL2 for the PC, no idea what happened to the AP127 for ODBC. - ADO for Windoze, easy to use but may require an APL system with namespaces - SQLink for Dyalog and APL2000, not as easy as ADO, but works well, and works on Linux The one thing which comes to mind is none (not AP127 nor ADO but maybe SQLink?) of the various DB interfaces allowed a bulk insert. Your program had to loop. At least this made for simpler error recovery when one insert somewhere in the middle of the data failed.