Are you talking about a temporary, as in seconds or minutes, down time or are you referring to a busted router or mother nature incident that may involve hours of downtime?
For the extended periods of downtime, I wrote in an option that i can switch my app to a "Standalone" mode so that it will write to a local mySQL dB. After the downtime is over, I click a button and it syncs the data over to the server dB. I thought about writing my SQL statements to a text file in that situation so that i can flush them at one time to the server but for some reason (which i can't remember right now), I chose not to do that. I use a lot of stored procedures and it's fairly simple to keep those updated in MSSQL and mySQL.
For the short periods of downtime where maybe the wireless connection flakes out for a second, I use the Specific Error Handler library (found on VIPM) that can be configured to retry any number of times when a SPECIFIC (get it - "specific error handler") error occurs. If unsuccessful, an error is reported and the app goes into lock down mode until it can successfully ping the server. Works great for my situation.