Page 1 of 1

How to replace TZParam.LoadFromFile

Posted: 16.10.2024, 11:06
by tintinux
Hi

In Zeos 8.0 the LoadFromFile method of the new type TZParam is marked as deprecated, and the message is "use Overload instead"
What does it mean ? Overload is a reserved word, can't be a method name...

Thanks

Re: How to replace TZParam.LoadFromFile

Posted: 17.10.2024, 16:52
by aehimself
A quick google search will give you the knowledge you are looking for. No, it does not mean you have to type "overload", but to use an other, overloaded version. The error message means the method you are calling is deprecated and possibly will be deleted soon. So you should call other methods (.LoadFromStream) or a different overload of the same method:

Code: Select all

Procedure MyMethod(Const inInput: Integer); Overload;
Procedure MyMethod(Const inInput: String); Overload;
Procedure MyMethod(Const inInput: TObject); Overload;

Re: How to replace TZParam.LoadFromFile

Posted: 19.10.2024, 12:20
by marsupilami
Hello tintinux,

it seems you are using the "procedure LoadFromFile(const FileName: String; BlobType: TBlobType)" overload. This overload is depreceated. Depending on what you want to load, you might want to switch to using to one of the code page aware overloads of LoadFromFile or to one of the LoadTextFromFile or LoadBinaryFromFile functions.

Best regards,

Jan