I have a Delphi 5 project that uses the Indy TidHTTP component. I recently tried opening the D5 project in Delphi 6. Evidently Indy has changed many things between D5 and D6. My code now no longer runs in D6. The part I'm stuck on is the use of a TStream instead of a TStringList. Here's the old D5 code:
lst := TStringList.Create;
with lst do
Values[Address2.Name] := Address2.Text;
Values[Address1.Name] := Address1.Text;
Values[City.Name] := City.Text;
Values[State.Name] := State.Text;
Memo1.Text := IdHTTP1.Post(Edit1.Text, lst);
The problem again is that the .Post method expects a TStream instead of a TStringList. Unfortunately, I don't know how to convert the code from strings to a stream. Can someone assist? Thanks.
- This article will help user in how to convert their numeric value become words.
How to use
1. You can copy this code in your Unit as function
2. than you can perform your function by type this code
Creating an auto free TStringList
The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list.
In such cases, you have to…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …