No Overloaded Version Error

Hello,

I keep getting this error when I try to compile my code.

[Error] VDmain.pas(221): E2250 There is no overloaded version of  'AssignFile' that can be called with these arguments.

I am at a total loss as to what is wrong.

Ray.

***************************************
type
   datatxt = Record
     msec: String[8];
     volts: String[6];
     water: String[6];
     charge: String[6];
     air: String[6];
     driven: String[6];
     speed: String[6];
     ebp: String[6];
end;

var

data: datatxt;
datafile: file of datatxt;
FilePath: String;

{-------------------------- Form Create -----------------------------}
procedure TForm1.FormCreate(Sender: TObject);
begin

   FilePath:= ExtractFilePath(Application.ExeName);

   if FileExists(FilePath + '\vdash.dat') = False then begin
       AssignFile(datafile, FilePath + '\vdash.dat');
       Rewrite(datafile);
       CloseFile(datafile);
   end;

end;
0
Ray
8/13/2008 10:16:07 AM
embarcadero.delphi.general 4258 articles. 0 followers. Follow

7 Replies
2615 Views

Similar Articles

[PageSpeed] 46

Ray Hall wrote:

> Hello,
> 
> I keep getting this error when I try to compile my code.
> 
> [Error] VDmain.pas(221): E2250 There is no overloaded version of
> 'AssignFile' that can be called with these arguments.
> 
> I am at a total loss as to what is wrong.
> 
> Ray.
> 
> ***************************************
> type
>    datatxt = Record
>      msec: String[8];
>      volts: String[6];
>      water: String[6];
>      charge: String[6];
>      air: String[6];
>      driven: String[6];
>      speed: String[6];
>      ebp: String[6];
> end;
> 
> var
> 
> data: datatxt;
> datafile: file of datatxt;
> FilePath: String;
> 
> {-------------------------- Form Create -----------------------------}
> procedure TForm1.FormCreate(Sender: TObject);
> begin
> 
>    FilePath:= ExtractFilePath(Application.ExeName);
> 
>    if FileExists(FilePath + '\vdash.dat') = False then begin
>        AssignFile(datafile, FilePath + '\vdash.dat');
>        Rewrite(datafile);
>        CloseFile(datafile);
>    end;
> 
> end;

One problem is that ExtractFilePath returns the path ending in a
backslash so you have a double backslash before vdash.dat. Don't know
if this is the cause of your problem but it is certainly a problem. The
error message does not seem to agree and it should be a runtime error
not a compile time error. Your code compiles with no errors in D2007.

<unsolicited>Just for more efficient coding, I would change the code to
do the concatenation just one time as:

   DataFileFN := ExtractFilePath(application.exename)+'vdash.dat';

then use datafilefn instead of the concatenation twice. Also unless you
have a need for the variables as global variables, I would put them
inside the procedure or if global, I would make them fields of your
form. The code compiles either way.</unsolicited>

--
0
Joe
8/13/2008 11:27:21 AM
Ray Hall wrote:

> [Error] VDmain.pas(221): E2250 There is no overloaded version of  'AssignFile' that can be called with these arguments.

Change order of Windows and Sysutils in the uses statement. You wanting AssignFile from SysUtils. Click right and find declaration to find what compiler looks at.

--
Jorge
0
Jorge
8/13/2008 5:01:23 PM
Jorge Almeida wrote:

> Change order of Windows and Sysutils in the uses statement. You
> wanting AssignFile from SysUtils.

There is no AssignFile in Windows.

> Click right and find declaration to find what compiler looks at.

That's a good idea, though <g>

-- 
Dave Nottage [TeamB]
0
Dave
8/13/2008 10:27:46 PM
Thank you everyone for replying.

I found AssignFile is declared in OoMisc. I found this statement about a bug fix for Delphi6. I am using Delphi2005.

Ray. 


{$IFDEF Delphi6}
{ These methods were overloaded to work around a Delphi 6 bug. }
procedure AssignFile(var F: File; const FileName: string); overload;
procedure AssignFile(var F: TextFile; const FileName : string); overload;
procedure Assign(var F: File; const FileName: string); overload;
procedure Assign(var F: TextFile; const FileName: string); overload;
{$ENDIF}
0
Ray
8/14/2008 9:09:13 AM
I have found that OoMisc, is part of  Async Pro components I am using. If I make a test program without any Async Pro components I do not get the error. In this test program AssignFile is declared in System.

Ray.
0
Ray
8/14/2008 9:48:10 AM
Ray Hall wrote:

> I have found that OoMisc, is part of  Async Pro components I am
> using. If I make a test program without any Async Pro components I do
> not get the error. In this test program AssignFile is declared in
> System.
> 
> Ray.

Just for the future: you can resolve this kind of identifier conflict
by prefixing the identifier in question with the unit name it should
come from, e.g.

   System.AssignFile(....);

-- 
Peter Below (TeamB)  
Don't be a vampire (http://slash7.com/pages/vampires), 
use the newsgroup archives :
http://www.tamaracka.com/search.htm
http://groups.google.com
0
Peter
8/14/2008 10:38:30 AM
> Just for the future: you can resolve this kind of identifier conflict
> by prefixing the identifier in question with the unit name it should
> come from, e.g.
> 
>    System.AssignFile(....);

Peter,

Thank you, that fixed the problem..

Ray.
0
Ray
8/15/2008 6:18:27 AM
Reply:

Similar Artilces:

EVarriantTypeCast error delphi language general
I uploaded above subject to the attachment space.with test.zip. If somebody coul have a look at the test i prepared. Since overall QuickReport does work, i could not guess what is going on here. Thanks in advance to have a look at the attached test i made and hopefully somebody can find the issue. Regards. Lieven Hi xxx, If nothing works, it could mean that somewhere a mistake was made.lol. For the uploaded to public attachment test.zip solution below. Regards Lieven {Sql code} QryPtDat1.Sql.Clear; QryPtDat1.Sql.Add('SELECT D."Names", ...

error error error
These are the 2 new errors i am getting now:   1).  Server Error in '/' Application. Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.Source Error: Line 53: ...

General error: I/O error
From a select statement, I get the following error... Select error: SQLSTATE = S1000 [Sybase][ODBC Driver][Adaptive Server Anywhere]General error:I/O error Fatal error: No error -- transaction rolled back. Since all I'm trying to do is a simple select, It seems like the database file is corrupt. Please advise if you have seen this error or know what is going on. The environment is ASA6.0.03 and WindowsNT4. Thank you. If you look in the window of the database server, do you see any errors? Can you execute other selects? -- Reg Domaratzki Sybase Mobile and...

errors errors errors..
Name: harun Email: harunbjk1903hrnatgmaildotcom Product: Firefox Summary: errors errors errors.. Comments: first of all when i launch firefox (3) i cant enter websites via writing.. for example when I type "google" and then press ctrl and enter, it crashes.. and i take lots of error reports. firefox 2 was better.. see you again , harun Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.9) Gecko/2008052906 Firefox/3.0 From URL: http://hendrix.mozilla.org/ ...

Error, Error and more errors
Okay, all I wanted to do was test this app out and it has been a nightmare. 1.) Didn't install the sql database. I had to manually install it. 2.) I get errors when trying to add a picture to an album. "Procedure or function ngUpdatePicture has too many arguments specified" Any ideas? I've gotten more errors than this, but there is no use in bitchin. Are you using the v1.6.1 installer? Also, did you select to install the SQL Server db and give it a valid admin login? What were some of the error messages? Did you have an existing DB from a previous install? ...

General error: internal database error
I've got this error message while trying to create index: "General error: internal database error. Transaction rolled back." What could cause that error? What can be done in this situation? Thanks Ricardas This is a multi-part message in MIME format. --------------8FAF9B581B4945BDB0446FD5 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Please boot the engine by hand by going to the command prompt and doing: dbeng50.exe <path to dbfile> What error message occurs on the SQL Anywhere console? Dave Wolf Sybase Profes...

General error: unknown error -308
My customer is getting the following error on 3 of 5 workstations. Novell Network running IPX. Membership/121 -308 - S1000:[Sybase][ODBC Driver][Adaptive Server Anywhere]General error: unknown error -308 Any Ideas? -- Elizabeth Livingston elivingston@advsol.com Turn on debugging in the client connection and see if you are getting any network errors. -308 is a connection terminated error. You can use the DBG and LOG connection parameters in your connect string, or check the "display debugging information to a file" and add a file name on the advanced tab of your ODBC...

Will not install in Delphi Version 6 --- [Error] ArcIWWebModuleBridge.pas(501): Undeclared identifier: 'ValueFromIndex'
HELP When I try to compile the IWEliteSuite_90_Delphi6.dpk --- I get the following error [Error] ArcIWWebModuleBridge.pas(501): Undeclared identifier: 'ValueFromIndex' Does anyone have a fix for this? Mark Moss USA ...

Is there a TRichEdit98 version suitable for the latest delphi versions?
Hello all, I am using TRichEdit98 in an old component I am trying to port to DelphiXE so I was wondering if anyone knows if there exist a TRichEdit98 for Delphi 2010? Regards On 21-Sep-10 22:41, John Ioannides wrote: > Hello all, > > I am using TRichEdit98 in an old component I am trying to port to DelphiXE so I was wondering if anyone knows if there exist a TRichEdit98 for Delphi 2010? Have you looked at TJvRichEdit in the JVCL? Not sure how much work converting from TRichEdit98 to TJvRichEdit will be, but it's probably worth the trouble as TJvRichEdit is compa...

Error on Delphi 6 but not on Delphi Xe for Ftp
I am Experimenting with get a file from our webside server via Ftp. I have 2 Machines 1 a laptop runing XP Delphi 6 Indy 10.5.8.0 An a machine runing Window 7 Delphi XE2 with Indy 10.5.8.0. I am using the Same Code on Both. procedure TFrmMain.ProcessItemDalySpecial; var PathDest : String; FileName : String; begin with FrmTb2 do begin if ReadIniBoolean(IniCfg,'FTP','UseFtpDaly') then begin Ftp.Host := ReadIniStr(IniCfg,'FTP','HostDaly'); Ftp.Port := ReadIniInt(IniCfg,'FTP'...

Installation ERROR: Assembly version does not match db version
I found this error The Assembly Version ( [ASSEMBLYVERSION] ) does not match the Database Version ( [DATABASEVERSION] ) My db is MS SQL 2005 Developers Edition which according to the documentation should can be used by DNN. Is there something Im missing. Check to see if there is a dnn.config file in the installs direcotry.  If there is try deleting the file and then accessing the site.S. Shawn MehaffiePC Resources, LLC Same Problem here...

Error when running a version 7 report in version 8
Hi I created a report in InfoMaker 7.0.3 Build 10009 which runs ok. After I import it into version 8.0 Build 7039 I get the following error message: Select error: ORA-01007: variable not in select list Any ideas please Thanks Chris Maltby Did you change Oracle client. What driver and what Oracle client are you using. I would strongly suggest installing 803 or 804, available from downloads.sybase.com. -- Terry Dykstra (TeamSybase) http://powerbuilder.codeXchange.sybase.com/ http://www.pb9books.com product enhancement requests: http://www.isug.com/cgi-bin/ISUG2/submit_enhan...

General error : internal database error ???
I have a client that is running Novell 4.1 with sqlanywhere 5.5.04; At this installation the workstations are constantly crapping out with the above mentioned error; We have tried most everything as it relates to the novell OS - even installed the latest servicepack (7); but to no avail; I am usually pretty good at solving problems but this one doesn't give me enough to go on; does anyone have a suggestion or two about what might be happening ? I have 20 other installations running novell 4.1 with no problem; tia Dennis Hank Have you tried comparing the SQLA instal...

Will Delphi XE2 co-exist with other Delphi versions ?
Can I install it on a machine that's got other Delphi's on it ? Lut Mentz wrote: > Can I install it on a machine that's got other Delphi's on it ? Yes. As far as I know that has always been the case. -- -Mike (TeamB) Lut Mentz wrote: > Can I install it on a machine that's got other Delphi's on it ? Yes -- it has always been the case that the new version co-exists peacefully with all the older ones. -- Nick Hodges -- Product Development Manager Gateway Ticketing Systems http://www.gatewayticketing.com > {quote:title=Mike Williams ...

Web resources about - No Overloaded Version Error - embarcadero.delphi.general

All sizes - Holiday Fire Safety - Overloaded electrical outlet - Flickr - Photo Sharing!
Flickr is almost certainly the best online photo management and sharing application in the world. Show off your favorite photos and videos to ...

Struggle of the Day: Overloaded Tuk Tuk Can’t Quite Make It Up Hill
This is the story of the little engine that couldn’t. A tuk tuk (automatic rickshaw) was carrying a bit too much wood to make it up a hill, and ...

Driver fined $800 for overloaded trailer in Scoresby
... east has been caught towing a huge number of household items, including the kitchen sink. The 43-year-old man was spotted towing an overloaded ...

Headband can tell when brain is overloaded
A NEW headband may be able to tell you when your brain is on mental overload and offload some of your work to another person.

Chopper overloaded before Sydney couple died
A helicopter that crashed into New York’s East River, killing a Sydney couple and another family member celebrating a 40th birthday, has been ...

iOS 9 download problems not due to overloaded delivery networks
The early download glitch users encountered in grabbing iOS 9 this week was not due to an overload on Apple's content delivery network.

EMS workers overloaded with mental health, addictions calls
Paramedics in Thunder Bay are responding to 80 per cent more calls than they did a decade ago and they say mental health problems and substance ...

Families of ferry's lost confront SKorea officials; signs that ship was heavily overloaded - CTV News ...
Angry relatives of some of the more than 120 people still missing from the sinking of the ferry Sewol surrounded the fisheries minister and the ...

Overloaded trucks at fault for bridge collapse
... Harbin authorities said on Wednesday that overloading caused the collapse of a bridge that killed three and injured five on Aug 24. Four overloaded ...

No homework or exams for China's overloaded pupils
No homework or exams for China's overloaded pupils People's Daily Online The Ministry of Education (MOE) issued a draft regulation on Thursday ...

Resources last updated: 1/21/2016 7:53:05 PM