One way to use ADO to access binary files in Access

xiaoxiao2021-03-06  41

Built a note field in Access (a text type with a large amount of data amount), named binary. Primary key ID. There is a TIMAGE loaded picture. memstream is tmemorystream; p is a memory byte: self.Image1.Picture.Bitmap.SaveToStream (memstream); memstream.seek (0, soFromBeginning); while memstream.Position

While i

l: = start (RecordSet.fields [1] .getchunk (1));

M: = RecordSet.fields [1] .Getchunk (L); i: = i 2 * l 2; tryb: = start (m); MEMSTREAM.WRITE (B, 1); Except Begin ShowMessage (INTSTR (L) ));

END;

MemStream.seek; self.image1.picture.bitmap.loadfromstream (memstream);

转载请注明原文地址:https://www.9cbs.com/read-77746.html

New Post(0)