If you do work that uses SQL databases, at some point you need to embed a large SQL script in your program. Manually typing all of that can be a real pain in the backside, and it's prone to typos, at least if you type like me. SQL Scripts also have an inconvenient way of changing.
My solution to that problem was sqlmodule, small program that given an SQL script will properly escape the text to include it as a static member in your program. I don't know if it will work for everyone, but it works well for C and Delphi, the two languages I use, and it works for SQL Server, SQLite, MySQL and PostgreSQL databases. Given those items it will take care of a fairly large number of needs.
Source is included below, as well as the windows executable for those who don't want to mess with building it yourself.
| Attachment | Size |
|---|---|
| sqlmodule.c | 12.13 KB |
| sqlmodule.exe | 30.96 KB |

![View your cart items []](/sites/all/modules/ecommerce/cart/images/cart_empty.png)
