Delphi"De Problem
-
Bi örnek vardı kayıt uygulaması diye görsel eğitim setinde.Name'leri dahi aynı girerekten yazdım kodları fakat derlemeye çalışınca if döngüsünün o tarafta hata veriyor kodlar şöyle ;
unit uMain;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TfrmMain = class(TForm)
Label1: TLabel;
Edit1: TEdit;
Label2: TLabel;
Edit2: TEdit;
Label3: TLabel;
Edit3: TEdit;
Label4: TLabel;
Edit4: TEdit;
Label5: TLabel;
Edit5: TEdit;
Label6: TLabel;
Edit6: TEdit;
Label7: TLabel;
Edit7: TEdit;
Label8: TLabel;
Edit8: TEdit;
Label9: TLabel;
Edit9: TEdit;
Label10: TLabel;
Edit10: TEdit;
Label11: TLabel;
Edit11: TEdit;
Edit12: TEdit;
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;
Tcustomer=record
CustNo: Integer;
Company: String[25];
Address1: string[30];
Address2: string[30];
city: string[20];
State: String[20];
ZIP: string[20];
Country: string[30];
Phone: string[20];
Fax: string[20];
contact: string[30];
end;
const
MAIN_DATA_PATH='C:\Program Files\Borland\Delphi7\dosya\customer\Data';
var
frmMain: TfrmMain;
Customer: TCustomer;
FileCustomer: file of TCustomer;
implementation
{$R *.dfm}
procedure TfrmMain.FormCreate(Sender: TObject);
begin
AssignFile(FileCustomer, MAIN_DATA_PATH + '\CustDB.dat');
{$I-}
Reset(FileCustomer); // dosyayı aç
IOResult
{$I+}
if IOResult <> 0 then [Bu noktada hata veriyor]
Rewrite(FileCustomer);
end;
procedure TfrmMain.FormClose(Sender: TObject; var Action: TCloseAction);
begin
CloseFile(FileCustomer);
end;
procedure TfrmMain.Button1Click(Sender: TObject);
begin
//post the customer record...
with customer do
begin
CustNo :=strtoint(Edit1.Text);
Company:= Edit2.Text;
Address1:= Edit3.Text;
Address2:= Edit4.Text;
city:= Edit5.Text;
State:= Edit6.Text;
ZIP:= Edit7.Text;
Country:= Edit8.Text;
Phone:= Edit9.Text;
Fax:= Edit10.Text;
contact:= Edit11.Text;
end;
end. -
IOResult tanıtılmamış
-
cosmic bunu yazdı:
-----------------------------
IOResult tanıtılmamış
-----------------------------
hocam bu eğitim setinde anlatan ipne de tanıtmadan aynen o şekil yazdı ne iş anlayamadım :|
-
cyb3rt1m3 bunu yazdı:
-----------------------------
cosmic bunu yazdı:
-----------------------------
IOResult tanıtılmamış
-----------------------------
hocam bu eğitim setinde anlatan ipne de tanıtmadan aynen o şekil yazdı ne iş anlayamadım :|
-----------------------------delphi sürüm farklılığı falan vardır sanırım üşenmesem şimdi formu falan ayarlamaya yapardım :D
-
cosmic bunu yazdı:
-----------------------------cyb3rt1m3 bunu yazdı:
-----------------------------
cosmic bunu yazdı:
-----------------------------
IOResult tanıtılmamış
-----------------------------
hocam bu eğitim setinde anlatan ipne de tanıtmadan aynen o şekil yazdı ne iş anlayamadım :|
-----------------------------delphi sürüm farklılığı falan vardır sanırım üşenmesem şimdi formu falan ayarlamaya yapardım :D
-----------------------------
hoca yap bi güzellik pazar arefesinin hatrına yav :D
-
pm attım bak