Jump to content

adragan

uniGUI Subscriber
  • Posts

    192
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by adragan

  1. Avoid frxDBDataset. It's not threadsafe. Also I had problems with RichText component. Try to store the database connection in the report with TUniDac Connection or whatever DB engine you use. It's threadsafe.
  2. I got this type of errors when the version of the unim-..... was not the same as the version of the library used to develop the program. On the server ..... unim-1.90.0.1550 but on development machine version was updated .....unim-1.90.0.1563 Hope it helps !
  3. As far as I know, Richtext is not thread safe. Maybe it was resolved in the mean time. I resolved the problem by using HTML tags in a TUniMemo. The export was ok.
  4. As far as I know Sqlserver has it's own backup cron. Template, backup plan and such. Why don't you use it ?
  5. I know there is a way to configure the DNS to do some sort of round robin algoritm. That means that mysystem.mycompany.com.br would point to 2 or more external IP adresses. You coud configure 2 master hiperservers ( + all slaves and notes replicated ) to respond each on it's routable IP adress and split the load from the main master hiperserver. You could reconnect all session later at the DB level. It's a crises solution, not very nice and in the mean time either implement Apache revers proxi or wait for Fershad to work his magic.
  6. While editing the report put 2 in Columns property.
  7. var pdf_name, fname : string; fs:TFormatSettings; begin ....................... //I think there is a newer function that generates a random name for files pdf_name:= 'Some_Name' + '_'+FormatDateTime('ddmmyyyynnss', Now(), fs)+'.pdf'; fname := UniServerModule.LocalCachePath + pdf_name; with YourTable do TBlobFile( FieldByName( 'The_Name_Of_The_Blob_Field' ) ).SaveToFile(fname); UrlFrame.BeginUpdate; UrlFrame.Url:=fname; UrlFrame.EndUpdate; end; Pay attention to paths !
  8. There are service providers that send SMS-s from a REST messages. I'm using this approch. From application I format a REST message according to the provider API using RestRequest, RestReponse etc. Each provider has a different API so code examples are of no use. I thought of Abaksoft solution at first but there was no GSM signal in the datacenter and sharing a modem USB port between more users has it's chalanges / complications. Not impossible thou.
  9. In very profane words here is how it goes: Classes presented by UniGui include a TCP server somewhere ( ServerModule actually ). When you compile as an app you compile the server inside the app + all the stuff you developed. Click on the app and it runns in the backgroud. You can see it in the task bar. If you run the browser and input http://localhost:8080 basically you request a connection to that TCP server from the app on port 8080 on protocol http. Now let't take Apache. Apache has some internel functions that let you bind external libruaries to it. Actually all Apache is a collection of libruaries with various functions. What Unigui does is to create a dll that has an entry point that can be called by Apache. That's why you put in the browser http://192.168.1.1/your_app.dll . You ask Apache to connect to the TCP server from your_app and present whatever your MainForm shows. Don't play too much with http.conf. You can mess it up easily. You can do without VirtualHost. First variant is the simplest.
  10. App.exe is not the host application. App.exe IS the application. By host application they mean IIS or Apache or any other web server that can run ISAPI dll-s. My advice is to develop and debug by generating exe app and when finished recompile as ISAPI dll and install it in the production enviroment ( IIS or Apache ). There is enough documentation on the site how to do it.
  11. On LAN there are solutions. On WAN it's more complicated unless you create a VPN with the remote clients.
  12. adragan

    send sms

    First of all you have to choose a service provider that receives messages on TCP/IP and converts them to SMS. There are lots of options and all have their interface different from each other. You format your interface based on their specification how the message should look like. Most use either SOAP or REST. More rare they use http so you can use TIdHttp to send the message. I used the RESTClient, RESTRequest, RESTResponse objects to handle the messages. Best of luck
  13. Browsing through 10000 records is meaningless. Using a significant result set from a query is something one needs. If it's about testing the performance of the framework, I can understand, but for a real world application it's a waste of time and resources.
  14. frRichView is not threadsafe. I got it. Tested ! I used TFrxMemoView with AllowHTNLTags:=True and inserted tags in text. Not the same thing but close .
  15. With MyDac you can work in 2 ways. If you put in the connection object Autocommit:=true it does the job by itself. Even if you have Autocommit:=True , if you explicitly start a transaction , you have to commit it the same way. If you start it and don't commit it it's anybody's guess what's happening, but by closing the query it will try to commit it anyway.
  16. To save the time, I got it from an example var S : TUniGUISessions; U : TUniGUISession; i , nr: Integer; ASessionList : array of TUniSessionInfoRec; begin S := UniServerModule.SessionManager.Sessions; nr:=S.SessionList.Count; S.Lock; // Using Lock on session manager should be used with extreme care. // We should keep this "Lock" active as short as we can. Session Manager stops working until lock is released. // Excessive use of lock/unlock or keeping the lock active for a long period will make uniGUI server slow/unresponsive. try SetLength(ASessionList, S.SessionList.Count); // Here we do a fast copy of list to another array for later use. nr:= S.SessionList.Count - 1; for i := 0 to nr do begin U := S.SessionList; ASessionList.ASessionId := U.SessionId; ASessionList.AIP := U.RemoteIP; ASessionList.ALastTime := U.LastTimeStamp; end; finally S.Unlock; // ... and finally don't forget to release lock! end;
  17. Speed of a query depends of a lot of things and I think the last one is UniGui. Run and optimize the query first from the administration console of the db server, Some DB engines load only a no of pages in memory and retrieve the rest only on demand. Try to check the processor load with users on if you can. That's only a few of the thing that can go wrong. In my case with 60 users connected and on a table in excess of 100 milion records an indexed search "paints" a result set of 216 records in less than 3 sec. So figure.
  18. Why don't you define 2 different sites on the same machine. One to be adressed as http://localhost/first_app and the second http://localhost/second_app I used this approach and it works.
  19. Hi all, I am trying to use the Menu object on tablet app. It has a Menu.Show property but as far as I can tell no Menu.Hide . Is there a way to hide the menu after pushing a button ?
  20. It's so simple : Use TUnimUpload UnimUpload.Accept:='image'; UnimUpload.Capture:='camcorder'; //For some reason 'camera' did not work UnimUpload.Execute; and OnCompleted CopyFile(PChar(AStream.FileName), PChar(DestName), False); where DestName is where on the server you want the picture saved. That's all
  21. adragan

    Server Web

    Check the firewall if it accepts inbound connections on the port of your application. If it's a exe then standard is 8077. If you tried ISAPI then standard is 80.
  22. If it's a mobile app don't forget the "m" at the end of the URL. I got it that way allready. Try to read parameters at OnCreat event of the main form. In case of Apache + ISAP module and mobile app the URL should look like : https://yourdomain.com/alias_from_httpd.conf/name_of_isapi_module.dll/m/?param1=.....&param2=......
  23. Solution for Lan Solution 1 Share the local workstation printer. Declare the printer as a "local" printer to the server. Create a table like IP, Server_Printer_Name ( actually the local printer) When you push the "Print" button swich to the local printer based on IP ( IP evidently must be fixed ) Generate and print the report, bar code etc. Solution 2 System service on server polling a table for "to be printed" reports, bar codes etc. In the table you specify which report, parameters, to what printer etc. WebApp inserts the respective information in the table. System service generates and prints it . After print, service deletes or marks as done the respective record from table. I saw this solution work 24/7 for 5 bar code label printing applicators in a factory. Maybe you can replicate it.
×
×
  • Create New...