I have no idea to do .
my solution:
1、add a bool field to table default false.
2、read the bool field first.if true then zquery.property.add('OldBLOB=true').if false do nothing.
3、read the blobdata
4、save the blob to a file
5、update the field use the file and change the bool field to true.
Search found 9 matches
- 04.01.2011, 07:47
- Forum: ZeosLib 7.0 Beta Forum
- Topic: BLOB corrupted from previous version
- Replies: 16
- Views: 2268
- 28.12.2010, 03:29
- Forum: ZeosLib 7.0 Beta Forum
- Topic: BLOB corrupted from previous version
- Replies: 16
- Views: 2268
- 27.12.2010, 11:04
- Forum: ZeosLib 7.0 Beta Forum
- Topic: BLOB corrupted from previous version
- Replies: 16
- Views: 2268
emm.. i found may be the problem is caused by an ansistring convert to a string. see my test demo in delphi2010. function StreamToString(mStream: TStream): AnsiString; var I: Integer; begin Result := ''; if not Assigned(mStream) then Exit; SetLength(Result, mStream.Size); for I := 0 to Pred(mStream....
- 27.12.2010, 05:00
- Forum: ZeosLib 7.0 Beta Forum
- Topic: BLOB corrupted from previous version
- Replies: 16
- Views: 2268
- 24.12.2010, 09:11
- Forum: ZeosLib 7.0 Beta Forum
- Topic: BLOB corrupted from previous version
- Replies: 16
- Views: 2268
i think if we can found a functionin delphi2010 which result is the same with the function Encodingstring. then we can solve the problem of write old vision blob data. function EncodeString(Value: string): string; var I: Integer; SrcLength, DestLength: Integer; SrcBuffer, DestBuffer: PAnsiChar; begi...
- 22.12.2010, 06:33
- Forum: ZeosLib 7.0 Beta Forum
- Topic: BLOB corrupted from previous version
- Replies: 16
- Views: 2268
i have solve the problem of reading old vision of blob data. it need test.it's my code; ZDbcSqLiteResultSet.pas TZSQLiteResultSet = class(TZAbstractResultSet) private FInfo:TStrings; public constructor Create(PlainDriver: IZSQLitePlainDriver; Statement: IZStatement; SQL: string; Handle: Psqlite; Stm...
- 20.12.2010, 08:53
- Forum: ZeosLib 7.0 Beta Forum
- Topic: BLOB corrupted from previous version
- Replies: 16
- Views: 2268
- 20.12.2010, 07:29
- Forum: ZeosLib 7.0 Beta Forum
- Topic: Bug: TZQuery.Bookmark does not work
- Replies: 12
- Views: 1895
- 17.12.2010, 11:51
- Forum: SQLite
- Topic: zeoslib+delphi2010 read a database create on delphi2007 err
- Replies: 1
- Views: 1246
zeoslib+delphi2010 read a database create on delphi2007 err
first sorry for my english I'M A Chinese i have a database created on delphi2007 with zeoslib i saved an icon file in then 'Icon' field(blob). when i try to read then icon field with delphi2010+zeoslib 7.0 i got a error. this is my code: procedure TForm1.ReadClick(Sender: TObject); begin ZConnection...