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
How to replace TZParam.LoadFromFile
Re: How to replace TZParam.LoadFromFile
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;
Delphi 12.2, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47
-
- Platinum Boarder
- Posts: 1999
- Joined: 17.01.2011, 14:17
Re: How to replace TZParam.LoadFromFile
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
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
Re: How to replace TZParam.LoadFromFile
In next versions, would it be possible to avoid removal of signatures ?
Or only after a deprecated clause for a long time in an intermediate version.
When signatures change, we have a lot of change to make in projects, and they become not backward compatible.
Thanks
Or only after a deprecated clause for a long time in an intermediate version.
When signatures change, we have a lot of change to make in projects, and they become not backward compatible.
Thanks
-
- Platinum Boarder
- Posts: 1999
- Joined: 17.01.2011, 14:17
Re: How to replace TZParam.LoadFromFile
Hello martinus,
Best regards,
Jan
Erm - this thread talks about a procedure that was marked as deprecated and was not removed. So we do exactly what you suggest. Are there methods that are missing?
Best regards,
Jan
Re: How to replace TZParam.LoadFromFile
Unfortunately... the answer is no. The magic of developing almost anything (let it be a component library, a hardware kernel driver or an end user application) as time goes and you add more features things become... well, deprecated.
To give a practical example... I had an application where in the settings file I stored the last command the user entered. Later I added the possibility to connect to multiple places and just by that - I need a last command for each place. So for backwards compatibility my application will read and parse the standalone last command, knowing the fact that soon it will be removed.
I have to admit I did not check the code, I don't know why and who (Zeos or Embarcadero) marked a specific method obsolete. But I do trust the developer who put that deprecated warning there.
There are always people who know more than what we do.
Delphi 12.2, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47