Hi Randy,
On May 24, 2004, at 3:58 PM, Randy J. Ray wrote:
No, this won't work (not even with the correction, which is still not correct code).
Do want to elaborate more? Why is the code not correct even with the correction? We will all learn from your input. Btw, I do start with the disclaimer that the code is untested. It is merely meant as a guidance for Wade [who, since we haven't heard back from, may already know what I set out to tell him ;-) ]. Let us (me) know what the correct code would be.
To export a database, you need more than just the contents. You need the structure (schema), indices, constraints, etc. All of this can be created using the DBD::SQLite driver, but you have to have the information in the first place, in order to make use of it.
I do understand that. That is why the code was merely a pointer in the right direction. Unfortunately, while SQLite has a COPY command (now on the endangered list), it does not have a DUMP command. So, one would have to use the .dump utility from SQLite shell. The objective was to mimic it with Perl. Also, afaik, there doesn't seem to be any "easy" facility to reconstruct the schema (I had asked a question on this a while back on this list). What I ended up doing was taking the response from querying the sqlite_master table and extracting the column names and types, etc. In any case, with enough fiddling around, the same concept as in my code could be applied to indexes, constraints, et al.
Many thanks,
-- Puneet.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]