Jump to content
uniGUI Discussion Forums

Search the Community

Showing results for tags 'firedac'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • uniGUI Public
    • Announcements
    • General
    • Feature Requests
    • Installation
    • Deployment
    • Other Platforms
  • Licensing
    • Licensing
    • Ordering uniGUI
  • Bug Reports
    • Active Reports
    • Closed Reports
    • Old Bug Reports
  • uniGUI Development
    • uniGUI 1.x
    • Beta Releases
    • Utilities
  • Mobile Platform
    • uniGUI Mobile
    • Mobile Browsers
  • Users Area
    • Sample Projects
    • Components and Code Samples
  • Non-English
    • Non-English
  • Miscellaneous
    • Hosting
    • Server Security
    • Jobs

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 6 results

  1. Kattes

    Problem With ISAPI

    Hello, I am a bit clueless with a big problem I need to solve ASAP. The current situation is as followed. I am running on a Windows 2016 server two uniGui Applications. One works as a non visual DB server, which feeds an external PHP Shop Application with information like articles , prices, etc. The other one is a Backend Application, which handles all the articles from the shop. So this behaves more like the standard uniGui Application we all know, using all the nice uniGui visual components we all love. But my problem comes from the non visual application, which sometimes is not reachable, which means API calls from the PHP application do not get any response. Main part of this application is the Methode "UniGUIServerModuleHTTPCommand", which looks like this: procedure TUniServerModule.UniGUIServerModuleHTTPCommand(ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo; var Handled: Boolean); var sJSON, sParam, sRequest, s : string; i : integer; bValidRequest : boolean; begin // Examples of Supported APIs: // http://localhost:8077/v1/prom?ID=47 >> Get Details of selected event with the ID 47 // http://localhost:8077/v1/Prom/CheckAvail >> Check if server is online // http://localhost:8077/v1/Proms >> Get List of current events bValidRequest := false; if pos('/v1', ARequestInfo.URI) = 1 then // API Call found !! begin AResponseInfo.ResponseNo := 200; Handled := True; if ARequestInfo.AuthExists and (ARequestInfo.AuthPassword='wshgdaizuddsfrtG12') and (ARequestInfo.AuthUsername='XCloud') then begin sRequest := Uppercase(ARequestInfo.URI); if sRequest = Uppercase('/v1/Prom/CheckAvail') then // Checking the API accessibility during the purchase process begin bValidRequest := true; sJSON := '{"status": "online"}'; AResponseInfo.ContentText := sJSON; LogPayServer('HTTP Request "CheckAvail"', sJSON); end; if sRequest=Uppercase('/v1/Proms') then // Returns a list of all currently active proms in JSON format. begin bValidRequest := true; sJSON := GetEventsAsJSON; LogPayServer('HTTP Request "Proms"', sJSON); AResponseInfo.ContentText := sJSON; end; if sRequest=Uppercase('/v1/Prom/OrderConfirmed') then // Called after the sales process has been completed begin sJSON := ARequestInfo.RawHeaders.Values['OrderInfo']; // Process received order information LogPayServer('HTTP Request "OrderConfirmed"', sJSON); if AddJsonOrderInformationToDB2(sJSON) then begin LogPayServer('HTTP Request "OrderConfirmed"', 'bValidRequest=true'); bValidRequest := true; AResponseInfo.ContentText := '{"status": "processed"}'; // if everything is OK, than return follwing: end else LogPayServer('HTTP Request "OrderConfirmed"', 'bValidRequest=false'); end; if sRequest=Uppercase('/v1/Prom') then begin sParam := ARequestInfo.Params.Values['VoucherVal']; // Request to check the value of the given voucher if sParam <>'' then begin bValidRequest := true; // Get from DB the value of the given voucher and return it to JSON sJSON := '{"voucher value": '+GetVoucherValue(ZConnectionServerModule, sParam)+'}'; AResponseInfo.ContentText := sJSON; LogPayServer('HTTP Request "VoucherVal" ('+sParam+')', sJSON); end; sParam := ARequestInfo.Params.Values['Id']; // Returns information of the event, which was selected via its Id if sParam <>'' then begin bValidRequest := true; sJSON := GetEventDetailsJSON(sParam); AResponseInfo.ContentText := sJSON; LogPayServer('HTTP Request "Prom?Id=?"', sJSON); end; end; if not bValidRequest then begin AResponseInfo.ContentText := '<html>Not supported API-Call; Please check API documentation!</html>'; LogPayServer('HTTP Request "API ERROR"', ARequestInfo.URI); end; end else begin AResponseInfo.ContentText := '<html>Wrong or missing PW; Please use Basic Auth!</html>'; LogPayServer('HTTP Request "Invalid Caller"', 'PW / Auth wrong'); end; end; end; The Internalisation Methode is also simple and straightforward: procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject); begin sHTML1 := tStringList.Create; sHTML2 := tStringList.Create; with ZConnectionServerModule do begin Connected := False; LibraryLocation := StartPath+'files\dll\libmysql.dll'; Protocol := 'mysql'; HostName := 'localhost'; Port := 3306; Database := 'xxxxx'; User := 'root'; Password := '-----'; Connected := true; end; LogPayServer('UniGUIServerModuleCreate','Server V'+FileVersionGet(StartPath+'AbiPaymentServer.dll')+' Created and running'); end; I am mentioning it here because as you can see it also uses a Log-Call, which writes information to a log table within my MySQL database and I can find randomly entries in the log, which show me that the application was restarted. At the moment the traffic handled by this Application is very low (less than 10 API calls per hour). Nevertheless I have the problem that the Application does not response and is not reachable sometimes. This is something I have not seen as long as I used it as standalone Application. Any comments or help are more than welcome!
  2. I have a TUniDBGrid linked to TDataSource linked to TFDQuery linked to TFDConnection using Postgress (PG) driver with default options. I have two browser instances open with the TUniDBGrid. When I make changes in the TUniDBGrid in one browser instance, it goes all the way through to the Posgress DB. I confirmed this on the server using PGAdmin. However clicking on the TUniDBGrid refresh icon in the second browser instance does not refresh the changes. Only a whole browser refresh (CTRL-F5), loads the changes. What also works is to add a dedicated button that closes and then opens the TFDQuery. I suspect some caching in the TFDQuery or TFDConnection? Any advice what to change to the TUniDBGrid refresh icon works correctly? Using Delphi 10.3 Update 2 & UniGui Version:1.90.0 build 1517
  3. J have a db msaccess and with component fdmsaceessservice j compact db. when execute then method repair or compact display error : 'Unknown OLE error [Colinitialize not called, ProgID: "JROJetEngine. with application vcl desktop run. thank, Antonio
  4. I have very interesting problem with SQL server and it has probably nothing to do with uniGUI. Actually, I am sure it has nothing to do with uniGUI whatsoever. I just hope someone here can shed some light into this. Our software is fairly large and both uniGUI standalone application and SQL server consume quite a lot of memory. When SQL server uses 4096Mb memory, which is most it can use, our software crashes. Only thing that is certain at this point is that when SQL Server uses maximum amount of memory, soon after our application will crash. As SQL server memory usage inevitably increases in time, application crash at some point is certain. I'm pretty sure SQL server isn't behaving badly in anyway. It has something to do with my code, FireDAC and uniGUI in combination. We currently still use SQL Server 2014 Express edition which is not ideal but that's what we got now. Also, upgrading database software would not be a real solution anyway even if it could alleviate this problem in short term because SQL server is most likely not the source of this problem. Software we are using: Delphi XE5 Architect uniGUI Pro Plus 1.0.0.1410 SQL server 2014 Express edition If anyone here has even a clue where to start looking, I'd be very greatful. // Mika
  5. When user is waiting fairly time consuming SQL query to finish and application crashes (halts without a trace but that's a another problem) for some reason, database connection might leave table(s) locked. This will cause said table to be unreadable (without dirty read) until database server is restarted. I thought that any and all database connections will be disconnected and any possible locks will be released when application crashes but that doesn't seem to be case. Do any of you have any suggestions how to track down and solve this problem? Database backend is Microsoft SQL Server 2014 Express and I use FireDAC access it. uniGUI version is 1.0.0.1406 (Complete). // Mika
  6. Hello Guys, I'm testing uniGUI Trial version, I would like to know how can I sort each columns of a Desktop UniDbGrid. I tried to follow GridColumnSort demo that is ClientDataSet, but I'm using FireDac. So at MainForm I did: //OnColumnSort event procedure TMainForm.UniDBGrid1ColumnSort(Column: TUniDBGridColumn; Direction: Boolean); begin UniMainModule.SortColumn(Column.FieldName, Direction); end; And at MainModule: uses DB, DBClient; procedure TUniMainModule.SortColumn(const FieldName: string; Dir: Boolean); begin if Dir then Main.MainForm.FDQuery1.IndexName := FieldName+'_ASC' else Main.MainForm.FDQuery1.IndexName := FieldName+'_DSC'; end; procedure TUniMainModule.UniGUIMainModuleCreate(Sender: TObject); var I: Integer; IndexnameAsc : string; IndexnameDes : string; begin with Main.MainForm.FDQuery1 do begin for i := 0 to FieldCount-1 do begin IndexnameAsc := Fields.FieldName+'_ASC'; IndexnameDes := Fields.FieldName+'_DSC'; IndexDefs.Add(IndexnameAsc, Fields.FieldName, []); IndexDefs.Add(IndexnameDes, Fields.FieldName, [ixDescending]); end; end; end; But when I click at column title nothing happens What I miss? Tks
×