mrb arkadaşlar uygulamamda oracle ile veritabanı yapıyorum arayüz olarak da delphiyi kullanıyorum. Formları oluşturdum ama bi yerde hata veriyo ve benim kod bilgim az olduğu için anlayamıyorum neden olduğunu yardımcı olursanız sevinirim. hata oluşturan kod sorgu kodu aşağıda kırmızı renkli kısım
unit Unit20;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, DBGrids, StdCtrls, DB, Ora, MemDS, DBAccess, OraSmart,
Mask, DBCtrls;
type
TMUSSORGU = class(TForm)
GroupBox1: TGroupBox;
ADI: TDBText;
SOYADI: TDBText;
UYRUK: TDBText;
OraSession1: TOraSession;
OraTable1: TOraTable;
OraDataSource1: TOraDataSource;
Button1: TButton;
DBGrid1: TDBGrid;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
MUSSORGU: TMUSSORGU;
implementation
{$R *.dfm}
procedure TMUSSORGU.Button1Click(Sender: TObject);
type TForm20= class(TForm)
Button1: TButton;
GroupBox1: TGroupBox;
ADI: TDBText;
SOYADI: TDBText;
UYRUK: TDBText;
OraSession1: TOraSession;
OraTable1: TOraTable;
OraDataSource1: TOraDataSource;
Button2: TButton;
procedure GroupBox1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form20: TForm20;
implementation
{$R *.dfm}
procedure TMUSSORGU.GroupBox1Click(Sender: TObject);
begin
var
Form2: TForm2;
implementation
uses unit1;
{$R *.dfm}
procedure TMUSSORGU.Button1(Sender: TObject);
begin
ıf ((ad.Value='') and (soyad.Value='') and (uyruk.Value<>'')) then
begin
oratable1.Filtered:=false;
oratable1.Filter:='uyruk='+''''+uyruk.Value+'''';
oratable1.Filtered:=true;
end;
ıf ((ad.Value='') and (soyad.Value=<>'') and (uyruk.Value'')) then
begin
oratable1.Filtered:=false;
oratable1.Filter:='SOYADI='+''''+soyad.Value+'''';
oratable1.Filtered:=true;
end;
ıf ((ad.Value=<>'') and (soyad.Value='') and (uyruk.Value'')) then
begin
oratable1.Filtered:=false;
oratable1.Filter:='ADI='+''''+ad.Value+'''';
oratable1.Filtered:=true;
end;
ıf ((ad.Value='') and (soyad.Value='') and (uyruk.Value'')) then
begin
showmessage('EN AZ BIR KOLON DOLU OLMALIDIR');
end;
ıf ((ad.Value=<>'') and (soyad.Value=<>'') and (uyruk.Value<>'')) then
begin
oratable1.Filtered:=false;
oratable1.Filter:='ADI='+''''+ad.Value+'''' and SOYADI='+''''+soyad.Value+''''+' and UYRUK='+''''+UYRUK.Value+'''';
oratable1.Filtered:=true;
end;
ıf ((ad.Value=<>'') and (soyad.Value=<>'') and (UYRUK.Value'')) then
begin
oratable1.Filtered:=false;
oratable1.Filter:='ADI='+''''+ad.Value+'''' and SOYADI='+''''+soyad.Value+'''';
oratable1.Filtered:=true;
end;
ıf ((ad.Value='') and (soyad.Value=<>'') and (UYRUK.Value<>'')) then
begin
oratable1.Filtered:=false;
oratable1.Filter:='SOYADI='+''''+soyad.Value+'''' and UYRUK='+''''+uyruk.Value+'''';
oratable1.Filtered:=true;
end;
ıf ((ad.Value=<>'') and (soyad.Value='') and (uyruk.Value<>'')) then
begin
oratable1.Filtered:=false;
oratable1.Filter:='ADI='+''''+ad.Value+'''' and UYRUK='+''''+uyruk.Value+'''';
oratable1.Filtered:=true;
end;
end;
end;
end;
end.
|