Changeset 51


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
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/CGI.lpi

    r50 r51  
    5050      </Item3>
    5151    </RequiredPackages>
    52     <Units Count="84">
     52    <Units Count="85">
    5353      <Unit0>
    5454        <Filename Value="CGI.lpr"/>
     
    9393        <IsPartOfProject Value="True"/>
    9494        <UnitName Value="UCore"/>
    95         <EditorIndex Value="10"/>
     95        <EditorIndex Value="12"/>
    9696        <WindowIndex Value="0"/>
    9797        <TopLine Value="1"/>
     
    166166        <IsPartOfProject Value="True"/>
    167167        <UnitName Value="UConfig"/>
    168         <EditorIndex Value="8"/>
     168        <EditorIndex Value="10"/>
    169169        <WindowIndex Value="0"/>
    170170        <TopLine Value="7"/>
     
    536536        <TopLine Value="1"/>
    537537        <CursorPos X="32" Y="10"/>
    538         <UsageCount Value="11"/>
     538        <UsageCount Value="12"/>
    539539        <Loaded Value="True"/>
    540540      </Unit54>
     
    558558        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Common/UXmlClasses.pas"/>
    559559        <UnitName Value="UXmlClasses"/>
    560         <EditorIndex Value="11"/>
     560        <EditorIndex Value="13"/>
    561561        <WindowIndex Value="0"/>
    562562        <TopLine Value="144"/>
    563563        <CursorPos X="2" Y="26"/>
    564         <UsageCount Value="20"/>
     564        <UsageCount Value="21"/>
    565565        <Loaded Value="True"/>
    566566      </Unit57>
     
    568568        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Common/UHtmlClasses.pas"/>
    569569        <UnitName Value="UHtmlClasses"/>
    570         <EditorIndex Value="12"/>
     570        <EditorIndex Value="14"/>
    571571        <WindowIndex Value="0"/>
    572572        <TopLine Value="731"/>
    573573        <CursorPos X="38" Y="434"/>
    574         <UsageCount Value="21"/>
     574        <UsageCount Value="22"/>
    575575        <Loaded Value="True"/>
    576576      </Unit58>
     
    579579        <IsPartOfProject Value="True"/>
    580580        <UnitName Value="UWebObjects"/>
    581         <EditorIndex Value="6"/>
     581        <EditorIndex Value="8"/>
    582582        <WindowIndex Value="0"/>
    583583        <TopLine Value="1"/>
    584584        <CursorPos X="1" Y="1"/>
    585         <UsageCount Value="39"/>
     585        <UsageCount Value="41"/>
    586586        <Loaded Value="True"/>
    587587        <DefaultSyntaxHighlighter Value="Delphi"/>
     
    606606        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/WebServer/UHTTPServer.pas"/>
    607607        <UnitName Value="UHTTPServer"/>
    608         <EditorIndex Value="13"/>
    609         <WindowIndex Value="0"/>
    610         <TopLine Value="196"/>
    611         <CursorPos X="1" Y="213"/>
    612         <UsageCount Value="10"/>
     608        <EditorIndex Value="15"/>
     609        <WindowIndex Value="0"/>
     610        <TopLine Value="82"/>
     611        <CursorPos X="15" Y="98"/>
     612        <UsageCount Value="11"/>
    613613        <Loaded Value="True"/>
    614614      </Unit62>
     
    703703        <Filename Value="../../PascalClassLibrary/Docking/CoolDocking/UCDClient.pas"/>
    704704        <UnitName Value="UCDClient"/>
    705         <EditorIndex Value="7"/>
     705        <EditorIndex Value="9"/>
    706706        <WindowIndex Value="0"/>
    707707        <TopLine Value="1"/>
    708708        <CursorPos X="42" Y="14"/>
    709         <UsageCount Value="10"/>
     709        <UsageCount Value="11"/>
    710710        <Loaded Value="True"/>
    711711      </Unit74>
     
    713713        <Filename Value="../../PascalClassLibrary/Docking/CoolDocking/CoolDocking.pas"/>
    714714        <UnitName Value="CoolDocking"/>
    715         <EditorIndex Value="9"/>
     715        <EditorIndex Value="11"/>
    716716        <WindowIndex Value="0"/>
    717717        <TopLine Value="1"/>
    718718        <CursorPos X="1" Y="1"/>
    719         <UsageCount Value="10"/>
     719        <UsageCount Value="11"/>
    720720        <Loaded Value="True"/>
    721721      </Unit75>
     
    729729        <EditorIndex Value="5"/>
    730730        <WindowIndex Value="0"/>
    731         <TopLine Value="1"/>
    732         <CursorPos X="23" Y="14"/>
    733         <UsageCount Value="21"/>
     731        <TopLine Value="163"/>
     732        <CursorPos X="1" Y="177"/>
     733        <UsageCount Value="23"/>
    734734        <Loaded Value="True"/>
    735735        <LoadedDesigner Value="True"/>
     
    766766        <TopLine Value="10"/>
    767767        <CursorPos X="1" Y="35"/>
    768         <UsageCount Value="10"/>
     768        <UsageCount Value="11"/>
    769769        <Loaded Value="True"/>
    770770      </Unit80>
     
    780780        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/WebServer/UHTTPSessionMySQL.pas"/>
    781781        <UnitName Value="UHTTPSessionMySQL"/>
    782         <WindowIndex Value="0"/>
    783         <TopLine Value="21"/>
    784         <CursorPos X="58" Y="42"/>
     782        <EditorIndex Value="6"/>
     783        <WindowIndex Value="0"/>
     784        <TopLine Value="2"/>
     785        <CursorPos X="14" Y="19"/>
    785786        <UsageCount Value="10"/>
     787        <Loaded Value="True"/>
    786788      </Unit82>
    787789      <Unit83>
     
    791793        <WindowIndex Value="0"/>
    792794        <TopLine Value="1"/>
    793         <CursorPos X="17" Y="16"/>
    794         <UsageCount Value="10"/>
     795        <CursorPos X="28" Y="10"/>
     796        <UsageCount Value="11"/>
    795797        <Loaded Value="True"/>
    796798      </Unit83>
     799      <Unit84>
     800        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     801        <UnitName Value="USqlDatabase"/>
     802        <EditorIndex Value="7"/>
     803        <WindowIndex Value="0"/>
     804        <TopLine Value="215"/>
     805        <CursorPos X="69" Y="223"/>
     806        <UsageCount Value="11"/>
     807        <Loaded Value="True"/>
     808      </Unit84>
    797809    </Units>
    798810    <JumpHistory Count="30" HistoryIndex="29">
    799811      <Position1>
    800         <Filename Value="Modules/UMainModule.pas"/>
    801         <Caret Line="51" Column="20" TopLine="34"/>
     812        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     813        <Caret Line="55" Column="28" TopLine="38"/>
    802814      </Position1>
    803815      <Position2>
    804         <Filename Value="Modules/UMainModule.pas"/>
    805         <Caret Line="24" Column="3" TopLine="7"/>
     816        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     817        <Caret Line="56" Column="28" TopLine="38"/>
    806818      </Position2>
    807819      <Position3>
    808         <Filename Value="Modules/UMainModule.pas"/>
    809         <Caret Line="113" Column="8" TopLine="96"/>
     820        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     821        <Caret Line="57" Column="28" TopLine="38"/>
    810822      </Position3>
    811823      <Position4>
    812         <Filename Value="Modules/UMainModule.pas"/>
    813         <Caret Line="92" Column="23" TopLine="75"/>
     824        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     825        <Caret Line="58" Column="29" TopLine="38"/>
    814826      </Position4>
    815827      <Position5>
    816         <Filename Value="Modules/UMainModule.pas"/>
    817         <Caret Line="163" Column="25" TopLine="146"/>
     828        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     829        <Caret Line="89" Column="63" TopLine="61"/>
    818830      </Position5>
    819831      <Position6>
    820         <Filename Value="Modules/UMainModule.pas"/>
    821         <Caret Line="60" Column="44" TopLine="60"/>
     832        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     833        <Caret Line="179" Column="37" TopLine="151"/>
    822834      </Position6>
    823835      <Position7>
    824         <Filename Value="Pages/UMainPage.pas"/>
    825         <Caret Line="25" Column="1" TopLine="1"/>
     836        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     837        <Caret Line="187" Column="18" TopLine="159"/>
    826838      </Position7>
    827839      <Position8>
    828         <Filename Value="Pages/UMainPage.pas"/>
    829         <Caret Line="8" Column="54" TopLine="1"/>
     840        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     841        <Caret Line="201" Column="45" TopLine="173"/>
    830842      </Position8>
    831843      <Position9>
    832         <Filename Value="Pages/UMainPage.pas"/>
    833         <Caret Line="23" Column="36" TopLine="1"/>
     844        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     845        <Caret Line="238" Column="38" TopLine="210"/>
    834846      </Position9>
    835847      <Position10>
    836         <Filename Value="Pages/UMainPage.pas"/>
    837         <Caret Line="28" Column="34" TopLine="11"/>
     848        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     849        <Caret Line="246" Column="18" TopLine="218"/>
    838850      </Position10>
    839851      <Position11>
    840         <Filename Value="Pages/UMainPage.pas"/>
    841         <Caret Line="30" Column="16" TopLine="13"/>
     852        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     853        <Caret Line="260" Column="46" TopLine="232"/>
    842854      </Position11>
    843855      <Position12>
    844         <Filename Value="Pages/UMainPage.pas"/>
    845         <Caret Line="28" Column="11" TopLine="11"/>
     856        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     857        <Caret Line="266" Column="54" TopLine="238"/>
    846858      </Position12>
    847859      <Position13>
    848         <Filename Value="Pages/UMainPage.pas"/>
    849         <Caret Line="11" Column="35" TopLine="11"/>
     860        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     861        <Caret Line="268" Column="18" TopLine="240"/>
    850862      </Position13>
    851863      <Position14>
    852         <Filename Value="Pages/UMainPage.pas"/>
    853         <Caret Line="64" Column="37" TopLine="47"/>
     864        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     865        <Caret Line="269" Column="56" TopLine="241"/>
    854866      </Position14>
    855867      <Position15>
    856         <Filename Value="Pages/UMainPage.pas"/>
    857         <Caret Line="23" Column="37" TopLine="12"/>
     868        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     869        <Caret Line="272" Column="37" TopLine="244"/>
    858870      </Position15>
    859871      <Position16>
    860         <Filename Value="Pages/UMainPage.pas"/>
    861         <Caret Line="90" Column="35" TopLine="73"/>
     872        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     873        <Caret Line="279" Column="18" TopLine="251"/>
    862874      </Position16>
    863875      <Position17>
    864         <Filename Value="Pages/UMainPage.pas"/>
    865         <Caret Line="127" Column="38" TopLine="110"/>
     876        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     877        <Caret Line="290" Column="40" TopLine="262"/>
    866878      </Position17>
    867879      <Position18>
    868         <Filename Value="Pages/UMainPage.pas"/>
    869         <Caret Line="153" Column="36" TopLine="136"/>
     880        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     881        <Caret Line="301" Column="37" TopLine="273"/>
    870882      </Position18>
    871883      <Position19>
    872         <Filename Value="Pages/UMainPage.pas"/>
    873         <Caret Line="199" Column="34" TopLine="182"/>
     884        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     885        <Caret Line="305" Column="18" TopLine="277"/>
    874886      </Position19>
    875887      <Position20>
    876         <Filename Value="Pages/UMainPage.pas"/>
    877         <Caret Line="233" Column="37" TopLine="216"/>
     888        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     889        <Caret Line="308" Column="45" TopLine="280"/>
    878890      </Position20>
    879891      <Position21>
    880         <Filename Value="Pages/UMainPage.pas"/>
    881         <Caret Line="297" Column="37" TopLine="280"/>
     892        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     893        <Caret Line="365" Column="35" TopLine="337"/>
    882894      </Position21>
    883895      <Position22>
    884         <Filename Value="Pages/UMainPage.pas"/>
    885         <Caret Line="312" Column="35" TopLine="295"/>
     896        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     897        <Caret Line="371" Column="32" TopLine="343"/>
    886898      </Position22>
    887899      <Position23>
    888         <Filename Value="Pages/UMainPage.pas"/>
    889         <Caret Line="364" Column="39" TopLine="347"/>
     900        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     901        <Caret Line="378" Column="42" TopLine="350"/>
    890902      </Position23>
    891903      <Position24>
    892         <Filename Value="Pages/UMainPage.pas"/>
    893         <Caret Line="388" Column="37" TopLine="371"/>
     904        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     905        <Caret Line="63" Column="41" TopLine="37"/>
    894906      </Position24>
    895907      <Position25>
    896         <Filename Value="Pages/UMainPage.pas"/>
    897         <Caret Line="406" Column="41" TopLine="389"/>
     908        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     909        <Caret Line="60" Column="46" TopLine="37"/>
    898910      </Position25>
    899911      <Position26>
    900         <Filename Value="Application/UWebObjects.pas"/>
    901         <Caret Line="1" Column="1" TopLine="1"/>
     912        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     913        <Caret Line="71" Column="70" TopLine="43"/>
    902914      </Position26>
    903915      <Position27>
    904         <Filename Value="CGI.lpr"/>
    905         <Caret Line="7" Column="14" TopLine="1"/>
     916        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     917        <Caret Line="51" Column="7" TopLine="48"/>
    906918      </Position27>
    907919      <Position28>
    908         <Filename Value="CGI.lpr"/>
    909         <Caret Line="15" Column="13" TopLine="1"/>
     920        <Filename Value="Modules/UMainModule.pas"/>
     921        <Caret Line="166" Column="39" TopLine="149"/>
    910922      </Position28>
    911923      <Position29>
    912         <Filename Value="Modules/UMainModule.pas"/>
    913         <Caret Line="61" Column="55" TopLine="44"/>
     924        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/WebServer/UHTTPSessionMySQL.pas"/>
     925        <Caret Line="31" Column="44" TopLine="14"/>
    914926      </Position29>
    915927      <Position30>
    916928        <Filename Value="Modules/UMainModule.pas"/>
    917         <Caret Line="15" Column="47" TopLine="1"/>
     929        <Caret Line="54" Column="1" TopLine="22"/>
    918930      </Position30>
    919931    </JumpHistory>
  • 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.