Jump to content

adragan

uniGUI Subscriber
  • Posts

    193
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by adragan

  1. I know only too well the so called spetialists from audit companies. They have no clue if they are taken out from the Windows / Oracle world. Linux is a mistery and the rest of the databases do not exist. "Cover your ...." seems to be their mission in life.
  2. I have the same configuration (IIS + Firebird + ISAPI) and I run on an intranet app 80 users. The processor rarely goes more than 10% on a not so great machine ( 2GB RAM , Win2008 ). Here are some reasons Firebird could drive you to "Session timeout" Firebird has the bad "habbit" to start garbage collection every 20000 or so transactions. This is slowing down considerably the response of the server and so you can go "timeout" because of that. You can choose a bigger no or disable "garbage collection" or set it on "manual" when making lots of inserts. Firebird keeps the indexies in sync after every transaction. This is also slowing down the inserts but keeps everithing in the proper order , not as some very much paised other SQL sistems. Deactivating the indexies ( if it's an available option for the operation of the business) would make inserts a lot faster. If you try to do 3 mil. inserts in a single tansaction the lock table grows too big and slow. If you commit after every insert it also takes to much time. Commiting after 500 - 1000 transactions seems to be an optimum. On my laptop I noticed that inserts starts with 300 transactions/sec, then slows down gradually and after some hundred thousend inserts it remains in a "serenity" start of doing nothing !! That's the most probable reason for timeout. You can disable "forced writes" on the database if you have a UPS. Try to creat a statement with parameters, prepare it and then execute the inserts. TTable and such perform horribly on SQL servers in general. Try to avoid them unless it's a table with max 10-20 records. Check the above an see if you can improve someting.
  3. There is a demo for that in the Demo directory of the installation.
  4. You edit, add, delete from the goods table. Ex: id parent_id description ============================== 1 0 TV 2 0 VIDEO 3 1 LCD 4 1 LED 5 2 SAMSUNG 6 2 SONY ..... and so on
  5. procedure TMainForm.LoadMenu; var nod1:TUniTreeNode; procedure AddSons(xnod:TUniTreeNode; pid:integer); var q:TUniQuery; // or q:TZQuery, TAdoQuery or the DB engine you work with nod2:TUniTreeNode; begin q:=TUniQuery.Create(Self); try q.Connection:=UniMainModule.Conn; q.Close; q.SQL.Clear; q.SQL.Add('select * from goods'); q.SQL.Add('where parent_id=:pid'); q.SQL.Add('order by id'); q.ParamByName('pid').Value :=pid; q.Open; while not q.eof do begin nod2:=TreeView.Items.AddChild(xNod, q.FieldByName(' whatever field holds the text of the line ').AsString); Nod2.ImageIndex:=0; //Or the id of the picture from the ImageList AddSons(Nod2, q.FieldByName('id').AsInteger); //Next level ! Recursiv !! q.Next; end; q.Close; finally q.Free; end; end; begin with TreeView do begin Items.Clear; Sel.Close; //Sel is a TUniQuery that is allready on the form Sel.SQL.Clear; Sel.SQL.Add('select * from goods where parent_id=0 order by id'); //The linked list starts from parent_id=0 Sel.Open; while not Sel.EOF do begin nod1:=Items.Add(nil, Sel.FieldByName(' field you what you want to display in the line..... ').AsString); Nod1.ImageIndex:=0; AddSons(Nod1, Sel.FieldByName('id').AsInteger); Sel.Next; end; Sel.Close; end; end; N.B. Replace the fields with the name of the ones you want. The list can go indefinitely deep. Check that you do not generate an eternal loop. Have fun !!
  6. In case you want to stick to the ini files : function ReadSetup:boolean; var fname:string; ini:TIniFile; begin fname:=UniServerModule.StartPath+'etc\your_conf_file.ini'; if FileExists(fname) then begin Conn.Connected := False; ini:=TIniFile.Create(fname); try ..... Read the stuff you want here result:=True; finally ini.Free; end; end else begin UniServerModule.Logger.AddLog('No conf file ->'+fname); result:=False; end; end;
  7. I tested more thorrowly. IE + Opera works Only Chrome does not work although it is updated to the last version. I'll keep on digging.
  8. Hi all, I tried to upgrade to version 0.93.1.1000 I uninstalled everything from windows. Afrer that I looked for all *.dcu and *.bpl and erased them from everywhere. Installation went smoothly. After that nothing worked. Not even the Demos from the UniGui installation. In Windows mode everything works. In web mode the screen remains with the gear rotating forever. In the log I get the following error for the Windowless_2006_2007 demo : Windowless_2006_2007: 000012C0: 09:27:20 [indy]:EIdNotConnected : Not Connected I wrote the path to the [ext] installation by hand in the Windowless demo. No luck. Please help ! Enviroment : Windows 7 with all updates, Delphi 2006 , installation on E: partition, ext4.1.1.a I have license form extjs libs, not that I have ever been asked to input any license code anywhere.
  9. Probably 80% of servers in Internet are Linux + Apache. Building so-s for Linux would open all that world . Just think !
  10. adragan

    i/o error 103

    It's a Delpi error and has something to do with text file manipulation. The message shoul be "File not open" Check if you do some text file append or you have some trace going on in a text file?
  11. UniServerModule.BeforeSessionClose I think it would be a usefull event. It does not matter if the user closes the application or it's session timeout. This would give us the opportunity to update logs and "gracefully" close connections to databases. Thanks
  12. Export to Excel is a big problem. My experience with it is quite bad. 3 users calling in the same time some report in Excel crush down a quad processor server. If they don't limit the no or records returned you can wait for 30 min and nothing happenes webapp goes in session timeout, not to mention sharing viloation and other errors. The solution , if I can call it like that, is to generate *,csv files and send them to the client. They get 100 times faster generated and Excel knows how to play with them. Simple, clear and fast ! Who wants more can play locally with colors, lines sorting and such. Here is a piece of code : procedure TUniMainModule.ExportExcel(ADataSet:TDataSet); var ts:TStringList; sir:string; i,j:integer; FileName:string; csv:string; begin if ADataSet.Active then begin ts:=TStringList.Create; try with ADataSet do begin DisableControls; First; j:=Fields.Count; while not EOF do begin sir:=''; for i:= 0 to j - 1 do sir:=sir + Fields.AsString+','; ts.Add(sir); Next; end; EnableControls; end; FileName := 'F' + FormatDateTime('hhmmss', Now()) + '.csv'; // Create a unique name for report. ts.SaveToFile(UniServerModule.LocalCachePath + FileName); finally ts.Free; end; csv:=UniServerModule.LocalCachePath + FileName; UniMainModule.SendFile(csv); end; end; That's all !
  13. Write a system service that from time to time ( ex :5 sec ) selects from a table in a database. When the service finds something to print , it selects the printer and does the printing; From the web application you have to write in the database table what is the label and to what printer it is supposed to go ( green , yellow whatever.) You have to share the local printers to the server so the server knows where to find them. That' s all.
  14. I prefer to create PDF files and send them to the client. Printing is much more precise that from html files. PDF creation uses the FastReport engine which works fine. There are some examples in this Forum about how that works. Client/Server objects from FastReport work fine but have some license limitations. As far as I know there are only 5 clients that can view reports in the same time ( why ? )
  15. Why don't you do a "report" with FastReports barcode component ? Is it mandatory to play with UniCanvas ?
  16. adragan

    Find Record

    From my DBase days I remember that, to change the order a table is presented you have to : 1. Close the data aware components. 2. Close the table. ( not mandatory but closes the application db buffers) 3. Set the new index active 4. Open table and force "First" on the table. ( Mandatory so that the db buffers reorganise ) 5. Activate the grid 6. Search on that key whatever you want.
  17. Thanks for all people who tried to answer. In the end it was, as I suspected but could not put the finger on it, a really stupid thing. Installation of Firebird was only "Server install". That's all I needed on the server when I started the project with a client-server application! For the web interface of the program it is evidently necessary that the instalation is "Server + Client", evidently the web module beeing the "client". I uninstalled the previous instalation and reinstalled with Server + Client option. It works now. Thanks again
  18. Hi all, It seems that Win2008 64 bit + IIS 7 has some extra configuration issues as compared to the procedure from the documentation. I configured all as in the Resources -> IIS7. On Win2003 all works fine. On Win2008 it is impossible to connect to the database ???!!!. Application starts , presents the logon screen and then "Login failed" because it can't connect to the database. ISAPI module error message pretends that the communication library "does not exist or can't be loaded". I put the fbclient.dll in every possible place ( c:\windows\system32\, c:\wondows\wow64 , next to the isapi.dll) I altered the PATH enviromet variable and added the path to where the dll was. No luck ! The same thing happened with the mysqllib.dll when I tried to connect to a mysql instance. If I compile the application as an StandAlone Application and place it in the very spot of the ISAPI.DLL everything works fine. No "Can't load libruary blalblabla..." message. It just works. Does anyone have an ideea why an ISAPI.DLL module can't load the communication libruary ( that is another dll ). If it's a security issue of IIS , how to deal with that ? Thanks Adrian
  19. adragan

    Some stuff

    1. Is OnDropDown event implemented in UniComboBox ? 2. Is it planned to be able to use *.png files in UniBitBtn ? Of corse I could convert the file format to *.bmp but I would have liked to use it as it is. Suggestion The way IW places controls in grids is quite streight-forward. StringGrid.Cells[i,j].Control=UniComboBox1 ( or UniEdit or UniBitBTN or something else )
  20. Look at the mySQL log. Maybe you have primery keys or mandatory fields in the database and for some reason the error is not properly signalled.
  21. Why don't you use the classical Master->Detail schema from Delphi. You could have 2 grids, one with clients and one with the adresses that takes the data from a query with parameter client_code from the first query. Then you need only one button to select the adress id and go forward with your things.
  22. Main Menu : File -> New -> Other -> Delphi Projects -> ActiveX The rest is silence !
  23. Thanks, I'll keep that in minde.
×
×
  • Create New...