am...@juno.com wrote:
> how to take a database in database (not structure) form--and copy and paste 
> it into an e-mail

A database file is binary; the easiest way would be to attach it.

If you want to paste it into the e-mail itself, you have to convert it to text 
somehow.
Either create a bunch of SQL commands (which includes all the data):

  $ sqlite3 test.db .dump
  PRAGMA foreign_keys=OFF;
  BEGIN TRANSACTION;
  CREATE TABLE t(x);
  INSERT INTO t VALUES('hello');
  INSERT INTO t VALUES('world');
  CREATE INDEX tx on t(x);
  COMMIT;

Or create a hexdump of the entire file:

  $ od -Ax -tx1 < test.db
  000000 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00
  000010 10 00 01 01 00 40 20 20 00 00 00 04 00 00 00 03
  000020 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00 04
  000030 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00
  000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04
  000060 00 2e 28 6a 0d 00 00 00 02 0f b7 00 0f df 0f b7
  000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  *
  000fb0 00 00 00 00 00 00 00 26 02 06 17 11 0f 01 3b 69
  000fc0 6e 64 65 78 74 78 74 03 43 52 45 41 54 45 20 49
  000fd0 4e 44 45 58 20 74 78 20 6f 6e 20 74 28 78 29 1f
  000fe0 01 06 17 0f 0f 01 2f 74 61 62 6c 65 74 74 02 43
  000ff0 52 45 41 54 45 20 54 41 42 4c 45 20 74 28 78 29
  001000 0d 00 00 00 02 0f ee 00 0f f7 0f ee 00 00 00 00
  001010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  *
  001fe0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07 02
  001ff0 02 17 77 6f 72 6c 64 07 01 02 17 68 65 6c 6c 6f
  002000 0a 00 00 00 02 0f ed 00 0f f7 0f ed 00 00 00 00
  002010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  *
  002fe0 00 00 00 00 00 00 00 00 00 00 00 00 00 09 03 17
  002ff0 01 77 6f 72 6c 64 02 08 03 17 09 68 65 6c 6c 6f
  003000

The biggest problem is that the recipient has to know how to turn that back
into a database.


Regards,
Clemens
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to