AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Exception EAccessViolation Form Free

Ein Thema von shidap · begonnen am 1. Feb 2005 · letzter Beitrag vom 1. Feb 2005
 
shidap

Registriert seit: 28. Jan 2005
Ort: Wiesbaden
6 Beiträge
 
Delphi 6 Professional
 
#4

Re: Exception EAccessViolation Form Free

  Alt 1. Feb 2005, 12:24
If the user does not have the report INI, it will prompted with a login, otherwise it will run the report automatically and (should) end the application upon completion.

Delphi-Quellcode:
procedure Tfrmsaselogin.FormCreate(Sender: TObject);
var Connstr : String;
strFTPReportDIR : String;
strUserId : ShortString;
begin
     Scaleform(self);
     DateSeparator := '-';
     ShortDateFormat := 'yyyy' + DateSeparator + 'mm' + DateSeparator + 'dd';
     ThousandSeparator := '.';
     DecimalSeparator := ',';

     try
         SaseAdoConn.Open
     except on E:Exception do
        begin
             Screen.Cursor := crDefault;
             SaseAdoConn := Nil;
             ShowMessage(E.Message);
        end;
     end;

     MyIniFile := TIniFile.Create('./SASE_Report.ini');
     logintry:=0;
     logon_q.DatabaseName:= SASEDB.DatabaseName;

     //Check if the .ini file exists or not
     If FileExists('./SASE_Report.ini') then
     begin
          strFTPReportDIR := MyInifile.ReadString('FTPReportDirectory', 'FTPReportDIR', '');
          If Trim(strFTPReportDIR) <> 'then
          begin
              MyInifile.Free;
              strUserId := 'Automatik';
              strUserId:=LowerCase(strUserId);
              strAccessLevel := '0';
              // Go straight to the Report Generator
              StartGenerateReports(Application,SaseAdoConn,-1, Now, Now, '');

              // when the user exits the Form "StartGenerateReports" the Application should end.
              If Assigned(frmsaselogin) then
                 frmsaselogin.Free;

              // I tried closed and Exit but the application remainded in the background

          end;
     end;

     // If there is no INI show the User the Login screen and let them enter their password

     USID_EB.Text := GetSystemUserName;
end;
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 03:53 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz