Einzelnen Beitrag anzeigen

Saulo

Registriert seit: 6. Jun 2003
58 Beiträge
 
Delphi 7 Enterprise
 
#9

Re: Allgemeine Fragen zu Access + Delphi

  Alt 16. Jul 2003, 19:46
ach ja und wenns weiterhilft: hier der quelltext:


Delphi-Quellcode:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, DBCtrls, Grids, DBGrids, StdCtrls;

type
  TForm1 = class(TForm)
    DBGrid1: TDBGrid;
    DBNavigator1: TDBNavigator;
    Button1: TButton;
    Edit1: TEdit;
    Edit2: TEdit;
    Label1: TLabel;
    procedure Button1Click(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

uses Unit2;

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
  qryADOQuery1.Open;
  if qryADOQuery1.FieldByName('passwort').AsString = form1.Edit1.Text then
   form1.Label1.Caption := 'richtig';
else
   form1.Label1.Caption := 'falsch';
end;

end.

und das Datenmodul:

Delphi-Quellcode:
unit Unit2;

interface

uses
  SysUtils, Classes, DB, ADODB;

type
  TDataModule2 = class(TDataModule)
    ADOConnection1: TADOConnection;
    ADOTable1: TADOTable;
    DataSource1: TDataSource;
    DataSource2: TDataSource;
    ADOTable2: TADOTable;
    ADOTable2ID: TAutoIncField;
    ADOTable2Vorname: TWideStringField;
    ADOTable2Nachname: TWideStringField;
    ADOTable2GebDat: TDateTimeField;
    ADOTable2Adresse: TWideStringField;
    ADOTable2Passwort: TWideStringField;
    ADOQuery1: TADOQuery;
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  DataModule2: TDataModule2;

implementation

{$R *.dfm}

end.
  Mit Zitat antworten Zitat