LoadFromFile load error!



Hi,all
My database is MS SQL Server 2000 SP4,my table is very large,about
94G,these codes works fine on Delphi 7

Data.q_tk.Append;
Data.q_tk.FieldByName('FILENAME').AsString:=FileArray[I];
Data.q_tk.FieldByName('FILESIZE').AsInteger:=FileSize[I];
Data.q_tkIMAGEDATA.LoadFromFile(filename);
Data.q_tk.Post;

(*
TData = class(TDataModule)
q_tk: TADOQuery; //Delphi 7 in ADO page,Delphi 2005 in dbGo page
q_tkIMAGEDATA: TBlobField; //SQL Server IMAGE data type
*)

All 94G data uploaded by the codes.

But when I upgrade codes on Delphi 2005 SP3 .net,LoadFromFile does not work
fine,for a example,a 274K file uploaded in the table will have about 200K
0x0 and at the end of 74K data is right data.

Reuses Delphi 7 complier these codes still work fine.

What's wrong (or different) with LoadFromFile? Please help me£¡

Sorry for my bad english,thanks a lot for any input!


.



Relevant Pages

  • Re: Am I the ONLY person that didnt know this?
    ... Delphi uses a smart link technologies to prevent the unused units ... initialization and finalization codes, ... still cause the units initialization and finalization code to be linked ...
    (comp.lang.pascal.delphi.misc)
  • Re: Delphi and C++
    ... means can we compile C++ codes in delphi ... C++Builder can be bought as standalone product, ... Both products can edit and compile C++ and .pas code. ...
    (alt.comp.lang.borland-delphi)
  • Re: Am I the ONLY person that didnt know this?
    ... initialization and finalization codes, ... Only the code path of the initialization finalization is linked in, ... I'm also not sure to which degree the Delphi linker eliminates ...
    (comp.lang.pascal.delphi.misc)
  • Re: Delphi and C++
    ... means can we compile C++ codes in delphi ... You will have to rewrite your C++ code in the delphi language; ... can't compile C++ directly. ...
    (alt.comp.lang.borland-delphi)
  • What is the successor of Turbo Pascal?
    ... Now I want to spend some time at home and programm some codes as an hobby. ... But I would want to practice a ... On the Borland site I only see ... Delphi. ...
    (comp.lang.pascal.delphi.misc)