Announcement

Collapse
No announcement yet.

Zugriffsverletzung mit ZEOS-Komponenten

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Zugriffsverletzung mit ZEOS-Komponenten

    Hallo,

    ich bin am Testen, greife mit Delphi 7 und ZEOS-Komponenten auf Firebird zu.

    Folgende StoredProc.

    Create Procedure MyTest
    (I_Par : Integer)
    Returns
    (R_Wert Integer)
    AS
    Begin

    R_Wert = 2 * I_Par;
    End

    ------------------------------

    Unter Delphi:

    Cl_Connection := TZConnection.Create(Self);

    Cl_Connection.Protocol := 'firebird-1.5';
    Cl_Connection.HostName := 'PCTest' ;
    Cl_Connection.Database := 'C:\Datenbanken\test_1.gdb';
    Cl_Connection.User := 'SYSDBA';
    Cl_Connection.Password := 'masterkey';

    Cl_StoredProc := TZStoredProc.Create(Self);

    With Cl_StoredProc Do
    Begin
    StoredProcName := 'MyTest';
    Params.Clear;
    With Params.CreateParam(ftInteger,'I_Par',ptInput) do AsInteger := 0;
    With Params.CreateParam(ftInteger,'R_Wert',ptOutput) do AsInteger := 0;
    Connection := Cl_Connection;
    End;

    Cl_Connection.Connect;

    Wert abfragen :

    If Cl_Connection.InTransaction Then
    Cl_Connection.Commit;
    Cl_Connection.StartTransaction;
    With Cl_StoredProc2 Do
    Begin
    Params[0].Value := StrToIntDef(Edit1.Text,2);
    ExecProc;
    Edit2.Text := IntToStr(Params[1].Value) ;
    End;
    Cl_Connection.Commit;
    Cl_StoredProc2.Close;

    Bei Aufruf execProc kommt dann die Exception .
    Warum ?

    Wenn ich aber eine SP aufrufe ohne Rückgabewerte funktioniert ExecProc .

    Gruß

    RalfE
Working...
X