Changeset 51 for trunk/Modules


Ignore:
Timestamp:
Apr 30, 2011, 11:44:14 PM (14 years ago)
Author:
george
Message:
  • Modified: SQL database class is now used as component.
Location:
trunk/Modules
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/UMainModule.lfm

    r50 r51  
    1414  end
    1515  object HTTPSessionStorageMySQL1: THTTPSessionStorageMySQL
     16    Database = Database
    1617    Timeout = 10800
    1718    SessionIdCookieName = 'SessionId'
     
    1920    top = 31
    2021  end
     22  object Database: TSqlDatabase
     23    Connected = False
     24    Encoding = 'utf8'
     25    left = 81
     26    top = 86
     27  end
    2128end
  • trunk/Modules/UMainModule.lrs

    r50 r51  
    77  +'./'#14'SessionStorage'#7#24'HTTPSessionStorageMySQL1'#9'OnRequest'#7#17'HTT'
    88  +'PServerRequest'#4'left'#2'Q'#3'top'#2' '#0#0#24'THTTPSessionStorageMySQL'#24
    9   +'HTTPSessionStorageMySQL1'#7'Timeout'#3'0*'#19'SessionIdCookieName'#6#9'Sess'
    10   +'ionId'#4'left'#3'8'#1#3'top'#2#31#0#0#0
     9  +'HTTPSessionStorageMySQL1'#8'Database'#7#8'Database'#7'Timeout'#3'0*'#19'Ses'
     10  +'sionIdCookieName'#6#9'SessionId'#4'left'#3'8'#1#3'top'#2#31#0#0#12'TSqlData'
     11  +'base'#8'Database'#9'Connected'#8#8'Encoding'#6#4'utf8'#4'left'#2'Q'#3'top'#2
     12  +'V'#0#0#0
    1113]);
  • trunk/Modules/UMainModule.pas

    r50 r51  
    3232    HTTPServer: THTTPServerCGI;
    3333    HTTPSessionStorageMySQL1: THTTPSessionStorageMySQL;
     34    Database: TSqlDatabase;
    3435    procedure HTTPServerRequest(HandlerData: THTTPHandlerData);
    3536  private
     
    5152    HtmlDocument: THtmlDocument;
    5253    Pages: TRegistredPageList;
    53     Database: TSqlDatabase;
    5454    PageName: string;
    5555    ModuleName: string;
     
    164164begin
    165165  inherited;
    166   Database := TSqlDatabase.Create;
    167166  Pages := TRegistredPageList.Create;
    168167  HtmlDocument := THtmlDocument.Create;
     
    176175begin
    177176  HtmlDocument.Free;
    178   Database.Free;
    179177  Pages.Free;
    180178  User.Free;
     
    291289  MainModule.HTTPServer.ShowExceptions := Config.ShowException;
    292290  //Database.Query('SELECT * FROM ssss');
    293   THTTPSessionStorageMySQL(MainModule.HTTPServer.SessionStorage).SqlDatabase := Database;
    294291  MainModule.HTTPServer.Run;
    295292end;
Note: See TracChangeset for help on using the changeset viewer.