SQL Dump and Restore

Chuck rwc1717 at shaw.ca
Fri Aug 29 14:42:19 CDT 2003


Hi Ruslan:
	I am writing these individually so as the subject line will reflect the topic.

	I am able to store and retrieve all the data (jpegs,mpegs) while inside the vdb 
file.  
Works like a charm.

The problem:

	I have dumped my database with its VString fields, VBlob fields and VText 
fields.
	It seems that if a VString dumped field has any carriage returns embedded in 
it... then the restore line by line does not work properly.

	I can get around that by using Blob fields, however the part of the dump with 
the binary data has to read line by line (same problem as above) until the ');' 
character and reconstructed.  By making sure the dump file field order are set that 
my 5 Blob fields are at the end of the 'INSERT into' statement, I can then put together 
the string...which reads

INSERT INTO CRecord (incidrec, lnamec, fnamec, genderc, dobc, agec, datec, 
timec, regionc, inctypec, locationc, employic, dutypc, forceuc, injuryc, superic, 
otherppic, otheraic, supersc, clipc, writerc, imageonec, imagetwoc, imagethreec, 
imagefourc, imagefivec, describec) VALUES ('00000000023', 'WnE9mOjqB]d', 
'0ptGAl1TpCl6', 'Male', '', 'Adult', 'Wednesday, August 6, 2003', '2004', '1201 
Vicville', 'x) Note found', '6 VICCR', '2] Handen, Pete -  Badge #000, 555-1212 [1] 
Other: whatever', '5 Other bathroom check', '12356 Addi', 'Minor', 'Holden, Dave -  
Badge #777, 123-4567', '', '', 'Caplon, Carl -  Badge #007, 123-4567', '', 'Albert, 
Peter', , , , , , 54 68 65 20 4A 6F 62 3A 0D 0D 09 53 6F 6D 65 74 69 6D 65 20 69 6E 
20 65 61 72 6C 79 20 4D 61 72 6E 6F 74 20 36 22 20 61 73 20 77 65 0D 68 61 64 20 
64 69 73 63 75 73 73 65 64 2E 2E 20 20 54 6F 20 66 69 78 20 74 68 69 73 20 77 65 
20 77 6F 75 6C 64 20 6E 65 65 64 20 61 20 73 65 63 6F 6E 64 20 73 74 65 70 2E);

which I sent then through the traditonal.....

dim j as integer
dim statement as string
statement = INSERT into........(as above)

j = mbd.SQLExecute(statement).......nada, rien.....babkiss

If I can get this to work...that would be good:-)

Thanks Chuck







More information about the Valentina mailing list