Problema compilare In Delphi 7


ZeroCools


Salut , am si eu o problema destul de mare. Incerc sa compilez un proiect in delphi si nu reusesc sa o fac , imi da urmatoarele erori
[Error] Unit5.pas(97): Undeclared identifier: 'PPAnsiCharArray'
[Error] Unit5.pas(113): Incompatible types
[Error] Unit5.pas(113): Incompatible types: 'String' and 'Integer'
[Error] Unit5.pas(127): Incompatible types
[Error] Unit5.pas(127): Incompatible types: 'String' and 'Integer'
[Error] Unit5.pas(138): Incompatible types: 'Parameter lists differ'
[Error] Unit5.pas(148): Incompatible types: 'Parameter lists differ'
[Error] Unit5.pas(192): Incompatible types: 'Parameter lists differ'
[Fatal Error] Unit2.pas(109): Could not compile used unit 'Unit5.pas'

Proiectul are mai multe unitati , se impotmoleste la unit5, unit5 are urmatorul cod .
CODE

unit Unit5;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DISQLite3Database,DISQLite3Api, ComCtrls;

type
Tuserbd = class(TForm)
Label1: TLabel;
Label2: TLabel;
utilizator: TEdit;
Label3: TLabel;
Label4: TLabel;
parolaa: TEdit;
vefparola: TEdit;
OK: TButton;
ComboBox1: TComboBox;
Label5: TLabel;
DISQLite3Database1: TDISQLite3Database;
Cancel: TButton;
ComboBox2: TComboBox;
Label6: TLabel;
procedure OKClick(Sender: TObject);
procedure CancelClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure ComboBox2DropDown(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
userbd: Tuserbd;
DB: TDISQLite3DatabaseHandle;
UserOK:Boolean=False;
VerificareOK:Boolean=False;
Inserare:String;


implementation

uses Unit1;

{$R *.dfm}



procedure Deschide_DB;
begin
Parola.TCPClient.WriteLn('DESCHIS');
if parola.TCPClient.ReadLn()='MOVE' then
begin
MarimeDB:=parola.TCPClient.ReadInteger(); //dimenziune baza date
SetLength(Buffer, MarimeDB);
parola.TCPClient.ReadBuffer(Buffer[0], MarimeDB);

assignfile(f, '.\temporara.db');
{$i-}
rewrite(f,1);
{$i+}
if IOResult=0 then
begin
blockwrite(f, Buffer[0], MarimeDB);
closefile(f);
end;

sqlite3_check(sqlite3_open(PAnsiChar('temporara.db'), @DB), DB);
end;
end;

procedure Inchide_DB;
var Key:string;
begin
parola.TCPClient.WriteLn('INCHIS');
assignfile(f, '.\temporara.db');
{$i-}
reset(f,1);
{$i+}
if IOResult=0 then
begin
MarimeDB:=filesize(f); //dimenziune baza date
SetLength(Buffer, MarimeDB);
blockread(f, Buffer[0], MarimeDB);
parola.TCPClient.WriteInteger(MarimeDB);
parola.TCPClient.WriteBuffer(Buffer[0], MarimeDB);
Key:=parola.TCPClient.ReadLn();
closefile(f);
end
else
parola.TCPClient.Disconnect;
sqlite3_check(sqlite3_close(DB), DB);
end;

function VerificaUser(UserData: Pointer; ColumnCount: Integer; ColumnValues, ColumnNames: PPAnsiCharArray): Integer;
begin
with UserBD do
begin

UserOK:=True;
Result := 0;
end;
end;



function verificare(UserData: Pointer; ColumnCount: Integer; ColumnValues, ColumnNames: PPAnsiCharArray): Integer;
begin
with UserBD do
begin
if ColumnValues[1]+' '+ColumnValues[2]+' '+ColumnValues[3]=ComboBox2.Text then
begin
VerificareOK:=True;
Inserare:=ColumnValues[0];
end;
Result := 0;
end;
end;

function Afis_DB2(UserData: Pointer; ColumnCount: integer; //afiseaza anagajatul
ColumnValues, ColumnNames: PPAnsiCharArray): integer;
begin
with UserBD do
begin
ComboBox2.Items.Add(ColumnValues[1]+' '+ColumnValues[2]+' '+Columnvalues[3]);
end;
result:=0;
end;

procedure Listare();
begin
UserBD.ComboBox2.Clear;
Deschide_DB;
sqlite3_check(sqlite3_exec(DB,
'SELECT * from Angajat;',
Afis_DB2, nil, nil),
DB);
Inchide_DB;
end;

procedure InserareOK();
begin
Deschide_DB;
sqlite3_check(sqlite3_exec(DB,
'SELECT * from Angajat;',
Verificare, nil, nil),
DB);
Inchide_DB;
end;


procedure Tuserbd.OKClick(Sender: TObject);
var eroare:Boolean;
exista:Boolean;
corect:Boolean;


begin
eroare:=False;
corect:=False;
exista:=False;

if (utilizator.Text='') or (Parolaa.Text='') or (VefParola.Text='') or
(ComboBox1.Text='') or (ComboBox2.Text='') then eroare:=true; //verifica daca toate campurile sunt completate
if eroare then
begin
MessageDlg('Completati toate campurile !',mtError,[mbOK],0);
parolaa.Text:='';
vefparola.Text:='';
combobox1.ClearSelection;
combobox2.ClearSelection;
end;
if (eroare=False) then //daca toate campurile sunt completate verifica daca parola=confirma parola
begin
if parolaa.Text<>vefparola.Text then corect:=True;
if corect then
begin
MessageDlg('Parola sau Verifica parola nu au fost introduse corect !',mtError,[mbOK],0);
parolaa.Text:='';
vefparola.Text:='';
combobox1.ClearSelection;
end;
end;
if (corect=False) and (eroare=False) then //daca precedentele sunt OK verifica daca exista userul in baza de date
begin
UserOK:=False;
Deschide_DB;
sqlite3_check(sqlite3_exec(DB,
'select * from Utilizator;',
VerificaUser, nil, nil),
DB);
Inchide_DB;
if UserOK then
begin
exista:=True;
MessageDlg('Utilizatorul exista in baza de date !',mtError,[mbOK],0);
utilizator.Text:='';
parolaa.Text:='';
vefparola.Text:='';
combobox1.ClearSelection;
combobox2.ClearSelection;
end;

end;


if (corect=False) and (eroare=False) and (exista=false) then

begin
InserareOK;
Deschide_DB;
sqlite3_check(sqlite3_exec(DB,
pansichar('insert into utilizator values ('#$27+pansichar(utilizator.text)+#$27+','+#$27+pansichar(parolaa.text)+#$27+','+#$27+pansichar(ComboBox1.Text)+#$27+','+#$27+pansichar(Inserare)+#$27');'),
nil, nil, nil),DB);

Inchide_DB;

showmessage('utlizator adaugat');
utilizator.Text:='';
parolaa.Text:='';
vefparola.Text:='';
combobox1.ClearSelection;
combobox2.ClearSelection;
end ;
end;





procedure Tuserbd.CancelClick(Sender: TObject);
begin
if MessageDlg('Sunteti sigur ca vreti sa anulati ?',
mtConfirmation, [mbYes,mbNo],0)=mrYes then userbd.Close;

end;

procedure Tuserbd.FormShow(Sender: TObject);
begin
utilizator.Text:='';
parolaa.Text:='';
vefparola.Text:='';
combobox1.ClearSelection;
combobox2.ClearSelection;
Listare;
end;

procedure Tuserbd.ComboBox2DropDown(Sender: TObject);
begin
ComboBox2.Perform(CB_SETDROPPEDWIDTH, 290, 0);
end;

end.

multumesc anticipat si astept un raspuns. multumesx
raducu84
pai fiecare cod de eroare iti spune frumos care e problema

'PPAnsiCharArray' - nu exista! din cunostintele mele nu exista in codul standard de Delphi tipul acesta de date.

Incompatible types: 'String' and 'Integer' - adica tu ai nevoie de string si variabila e de tip integer

si asa mai departe.
 
Aceasta este o versiune simplificatã a paginii originale. Pentru a vizita versiunea originala click aici.