Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Undeclared identifier ToString

Status
Not open for further replies.

cupboy2013

Programmer
Mar 21, 2013
27
US
Code:
Writeln('rows affected: ' + ADODataset1.Recordset.RecordCount.ToString());  // undeclared identifier ToString

If I leave out ToString() I get a compile error and if I leave it in ToString is underlined in red and says undeclared identifier ToString

The program compiles and runs ok, so what is this some sort of bug in the IDE and is there a fix for it?
 
Add System.SysUtils to your Uses clause.

/Daddy

-----------------------------------------------------
Helping people is my job...
 
Code:
uses
  Data.Win.ADODB, System.SysUtils, ActiveX;

It's already there.
 
You should also be able to do this:

Code:
Writeln('rows affected: ' + IntToStr(ADODataset1.Recordset.RecordCount));
 
Yes, that will be the way to do it to avoid the syntax error message so have switched to that.
 
It should work, the ToString() record helper is there in SysUtils...

-----------------------------------------------------
Helping people is my job...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top