Jump to content

Nathan Wild

Members
  • Content Count

    69
  • Joined

  • Last visited

Everything posted by Nathan Wild

  1. I am new to IntraWeb and thought I was making out nicely with a test application. I have a TIWDBGrid component linked to a datasource linked to a query which displays data perfectly as long as I do not define any columns and let the grid handle itself. As soon as I define columns (which I need to do in order to make one of them a link, change titles, etc.) I get the right number of rows displaying, but NO DATA. The attached screenshot contains two IWDBGrids. Both have the datasource set to the same thing at run-time. The first has two columns defined with valid field names, the second has no column definition at all. Both display the same (correct) number of rows, but only the second one populates each row with data??
  2. Nathan Wild

    win32 exe compiled in Delphi11 does not run on W2000

    Indeed.. I was delighted to find a post about this, but even with the PE version set to 5.0, I am still getting "Not a valid Win32 application" on Windows 2000. Is there anything else that might cause this?
  3. In case it is helpful, the system where this manifested for us was a Windows 2019 "essentials" server. The KB patch was not available for this OS, but I no longer care as the IPWorks component works fine 😉
  4. In case anyone is curious... I moved over to using the N*Software TipwREST component for this and the issue does not manifest.
  5. Does anyone know if KB5020435 fixes this issue on Windows Server 2019? Or is this a Win-10 specific thing? We are having no issues at all on Win11 and Windows Server 2022.
  6. I am trying to append records to a pair of tables in a master/detail relationship. The master dataset is a writable FDQuery with an AutoInc key field. When I post to this dataset the autoinc field has a value of -1. I want to go on and write out detail records, but nothing I've tried will give me the actual value for autoinc field in the newly posted master dataset. I am not able to call FDQuery.Refesh() as it gives me a "SQLBind Parameter has not been called for parameter" error (I've posted about this before and apparently it is a known bug). FDQuery.RefreshRecord() gives me an error "[FireDAC][DApt]-400. Fetch command fetched [0] instead of [1] record. Possible reasons: update table does not have PK or row identifier, record has been changed/deleted by another user" As my master dataset is sorted by the autoinc key field, I was able to solve the issue by calling FDQuery.First() and FDQuery.Last(), but this feels wrong, so I thought I would check in and see if anyone had a suggestion for how this *SHOULD* be done? Thanks in advance...
  7. I've had this working for ages, but now for some reason at one customer site, I am not able to connect to the server. I call .FtpLogon() and it just sits there... Using the exact same code with the exact same parameters works from another computer, so I am confident that this is something to do with this particular customer's network - however when I create an equivalent connection in WinSCP (Protocol: FTP, Encryption: TLS/SSL Explicit encryption; Port: 21) it works perfectly. The following is what I am calling... Any idea what I am missing, and why it would only fail on this particular system? Thanks in advance for any guidance!! ftpMultiClient.HostName1 := 'myhost'; ftpMultiClient.UserName := 'user'; ftpMultiClient.Password := 'password'; ftpMultiClient.FtpType := FtpTypeAuthSslBoth; ftpMultiClient.Port := '21'; ftpMultiClient.ConnectionType := ftpDirect; ftpMultiClient.PassiveX := True; ftpMultiClient.XferMode := XferModeBinary; ftpMultiClient.Timeout := 600; ftpMultiClient.FtpSslPort := '990'; ftpMultiClient.SslSessCache := True; ftpMultiClient.FtpSslVerMethod := ftpSslVerNone; ftpMultiClient.FtpSslRevocation := FALSE; ftpMultiClient.FtpSslReportChain := FALSE; ftpMultiClient.FtpSslCliSecurity := sslCliSecTls1; ftpMultiClient.TarDir := '/'; ftpMultiClient.BulkMode := BulkModeUpload;
  8. I DID remove this iCLS DLL, and I have confirmed that my application is loading and running without accessing it anything other than the two OpenSSL DLLs that come with the ICS distro. The same application works properly on another computer on the same network. Still perplexed 🙂
  9. Thank you very much. This insight helps. It looks like I am grabbing C:\Program Files (x86)\Intel\iCLS Client\libeay32.dll along with libssl-1_1.dll and libcrypto-1_1.dll from my application directory. I have renamed this file and when I execute my application it no longer hooks that DLL, nor does it find any other SSL-looking DLLs other than the two in my application folder, which are the ones that ship with ICS. Application still fails to connect as before... 😞
  10. Thanks again... I am on 10.1 Berlin, which must be old enough that GetIT is out of date. No worries there as installing it from the Overbyte site worked fine. I am using the two OpenSSL DLLs that ship with 8.67 (in the OpenSSL-Win32 folder). I have deleted all other DLLs in my application folder. I am running the following code: GSSL_DLL_DIR := ExtractFilePath(Application.EXEName); LoadSsl(); DebugLn('SSL/TLS "' + GLIBEAY_DLL_FileName + ' Version: ' + OpenSslVersion); Which reports: SSL/TLS "C:\WebExport\libcrypto-1_1.dll Version: OpenSSL 1.0.0k 5 Feb 2013 Is there any way it could be sucking in the wrong DLL from somewhere even though I am explicitly setting the path?
  11. DLLs were distributed in same folder as my EXE, but I am not setting GSSL_DLL_DIR to same, just to be safe. I downloaded the latest version of the OpenSSL stuff from the Overbyte site, and updated to ICS v8.67 while I was at it. Prior, I was using the 8.62 version that was in GetIT (serves me right for trusting that abominable package manager!?)... Now SSL version reports as libcrypto-3.dll Version: OpenSSL 1.0.0k 5 Feb 2013 Detailed FTP log is still giving me the same thing though: 2021/11/03 11:07:48 AM: FTP Session Connected OK to: [mysite]:21 2021/11/03 11:07:48 AM: > HOST [mysite] 2021/11/03 11:07:48 AM: < 530 Please login with USER and PASS. 2021/11/03 11:07:48 AM: > AUTH SSL 2021/11/03 11:08:03 AM: FTP Session Closed 2021/11/03 11:08:03 AM: Failed to Connect to FTP Server: 426 Timeout
  12. Thanks again... It reports as: SSL/TLS DLL: C:\WebExport\libcrypto-1_1.dll, Version: OpenSSL 1.0.2k 26 Jan 2017
  13. Indeed... I'm pretty new to OpenSSL, so I just grabbed the required DLLs from another installation.DLLs... That's why I was wondering how to get the application to report what version of SSL *IT* sees? I have: libcrypto-1_1.dll v1.1.0.5 libeay32.dll v1.0.2.11 libssl-1_1.dll v1.1.0.5 ssleay32.dll v1.0.2.11
  14. Thank you again for your assistance... I had FtpSslCliSecurity set to sslCliSecTls1. Setting it to sslCliSecIgnore had no effect. ftpMultiClient.FtpType := FtpTypeAuthSslBoth; ftpMultiClient.FtpSslVerMethod := ftpSslVerNone; ftpMultiClient.FtpSslCliSecurity := sslCliSecIgnore; // Have also tried sslCliSecTls1 ftpMultiClient.SslType := sslTypeImplicit; // Have also tried sslTypeNone, sslTypeAuthTls ftpMultiClient.FtpType := FtpTypeAuthSslBoth; ftpMultiClient.FtpSslVerMethod := ftpSslVerNone; ftpMultiClient.FtpSslCliSecurity := sslCliSecIgnore; // Have also tried sslCliSecTls1 ftpMultiClient.SslType := sslTypeImplicit; // Have also tried sslTypeNone, sslTypeAuthTls Other clients, including this same application with the same setting from another computer on the network in the same location are working fine. How can I determine the SSL version? I have the same version of the OpenSSL DLL's deployed with the application in all instances.
  15. It does timeout after a bit. In my original code, I had the timeout set extremely high... 2021/10/29 10:28:56 PM: > AUTH SSL 2021/10/29 10:29:11 PM: FTP Session Closed 2021/10/29 10:29:11 PM: Failed to Connect to FTP Server: 426 Timeout 2021/10/29 10:28:56 PM: > AUTH SSL 2021/10/29 10:29:11 PM: FTP Session Closed 2021/10/29 10:29:11 PM: Failed to Connect to FTP Server: 426 Timeout
  16. Nice, thanks... This is what it logs: Connect/Logon to FTP Server: [server redacted]:21 < 220 (vsFTPd 3.0.3) FTP Session Connected OK to: [ip redacted]:21 > HOST [server redacted] < 530 Please login with USER and PASS. > AUTH TLS
  17. Thanks. I was not aware that icsLogger was for this purpose... Are there any other relevant events that I should be capturing log info from, or the CopyEvent?
  18. Thanks very much to everyone that has responded so far... I have ensured that the firewall is completely off, and I did set up an icsLogger to see what was going on, and this is what if gives me: 08:41:36:067 ! HighLevelAsync 0 08:41:36:115 Control DNS Lookup Done - 35.167.253.97 08:41:36:115 03746150 Socket handle created handle=1488 08:41:36:137 TWSocket will connect to 35.167.253.97:21 08:41:36:169 Control Socket Connect, error=0 to 35.167.253.97:21 08:41:36:169 03746150 TryToSend handle=1488 08:41:36:170 03746150 TriggerDataSent handle=1488 08:41:36:197 >|220 (vsFTPd 3.0.3)| 08:41:36:197 ! HighLevelAsync 0 08:41:36:197 Start command, Req=HostAsync - HOST ftp1.shophero.com 08:41:36:197 03746150 PutDataInSendBuffer handle=1488 len 24 [1] 08:41:36:197 03746150 TryToSend handle=1488 08:41:36:198 03746150 TryToSend handle=1488 08:41:36:198 03746150 TriggerDataSent handle=1488 08:41:36:219 >|530 Please login with USER and PASS.| 08:41:36:219 ! HighLevelAsync 0 08:41:36:219 Start command, Req=AuthAsync - AUTH TLS 08:41:36:219 03746150 PutDataInSendBuffer handle=1488 len 10 [2] 08:41:36:219 03746150 TryToSend handle=1488 08:41:36:219 03746150 TryToSend handle=1488 08:41:36:219 03746150 TriggerDataSent handle=1488 Angus: I would love to see that. Please do post it if you have a chance.
  19. Nathan Wild

    FireDAC / ODBC Parameter size error?

    I am having a really strange problem with an INSERT query in FireDAC (connecting to a Pervasive Zen v14 database). I am not doing anything particularly strange, or different than I have done for years, and this exact same query works perfectly on my system some of the time. It only appears to fail AFTER I run another unrelated INSERT query. To further complicate things, it works perfectly 100% of the time on production systems with different versions of the DBMS. Code is simple: qry := TFDQuery.Create(Self); qry.Connection := con; qry.SQL.Text := 'INSERT INTO PROMOTIONS'; qry.SQL.Add('(PromoCode,PromoName,CustLimit,StartDate,StartTime,EndDate,EndTime,TriggerQnty,'); qry.SQL.Add('PromoType,PromoOption,PromoPrice,PriceType,AdverCode,PromoDescr,'); qry.SQL.Add('PromoGroup,MQDQnty,NextPrice,RetSales,PromoSales,QtySold,Qty2Sell,LevelPVDTotal1,LevelPVDPrice1,'); qry.SQL.Add('LevelPVDTotal2,LevelPVDPrice2,LevelPVDTotal3,LevelPVDPrice3,LevelPVDTotal4,LevelPVDPrice4,'); qry.SQL.Add('MerchCode,PromoPriority,DealCode,POSPromoCode,ActiveStatus,PUSER1,PUSER2,PUSER3,CaseCost,AllowanceCode)'); qry.SQL.Add('VALUES (:PROMOCODE,:PROMONAME,:CUSTLIMIT,:STARTDATE,:STARTTIME,:ENDDATE,:ENDTIME,:TRIGGERQNTY,'); qry.SQL.Add(':PROMOTYPE,:PROMOOPTION,:PROMOPRICE,:PRICETYPE,:ADVERCODE,:PROMODESCR,'); qry.SQL.Add(':PROMOGROUP,:MQDQNTY,:NEXTPRICE,0,0,0,0,0,0,'); qry.SQL.Add('0,0,0,0,0,0,'); qry.SQL.Add(':MERCHCODE,0,'''','''','''',:PUSER1,:PUSER2,:PUSER3,0,'''');'); qry.ParamByName('PROMOCODE').AsString := sPromoCode; qry.ParamByName('PROMONAME').AsString := sPromoName; qry.ParamByName('CUSTLIMIT').AsString := sCustLimit; qry.ParamByName('STARTDATE').AsString := FormatDateTime('YYYY/MM/DD', dtStart); qry.ParamByName('STARTTIME').AsString := '00:00'; qry.ParamByName('ENDDATE').AsString := FormatDateTime('YYYY/MM/DD', dtEnd); qry.ParamByName('ENDTIME').AsString := '23:59'; qry.ParamByName('TRIGGERQNTY').AsFloat := iSplit; qry.ParamByName('PROMOOPTION').AsString := sPromoOption; qry.ParamByName('PROMOPRICE').AsCurrency := fPrice; qry.ParamByName('PROMOTYPE').AsString := sPromoType; qry.ParamByName('PRICETYPE').AsString := sPriceType; qry.ParamByName('MQDQNTY').AsInteger := iMQDQnty; qry.ParamByName('NEXTPRICE').AsCurrency := 0.00; qry.ParamByName('ADVERCODE').Size := 10; qry.ParamByName('ADVERCODE').AsString := ''; qry.ParamByName('PROMODESCR').AsString := ' '; qry.ParamByName('PROMOGROUP').AsString := ' '; qry.ParamByName('MERCHCODE').AsString := ' '; qry.ParamByName('PUSER1').AsString := ' '; qry.ParamByName('PUSER2').AsString := ' '; qry.ParamByName('PUSER3').AsString := ' '; qry.ExecSQL(); (yes, I have to specify all those default values, the database does not have defaults defined. Makes for some big awkward queries!) The issue is with the ADVERCODE parameter. If I leave it set to '', it fails with the following logged to the FireDAC trace: 10160803900001 17:00:09.700 TFDPhysODBCCommand TFDQuery($05973BE0) . Param [N=13, Name="ADVERCODE", Mode=INPUT, Type=WCHAR, Size=255, Len=0, Data(0)=''] 10160804210001 17:00:09.732 TFDPhysODBCDriver ODBC . EXIT SQLExecute with return code -1 (SQL_ERROR) HSTMT 0x06FFC590 DIAG [HY000] [Zen][ODBC Client Interface]Data translation failure. (0) DIAG [22001] [Zen][ODBC Client Interface][LNA][Zen][SQL Engine]String length exceeds column length Parameter #13. Data truncated. (0) Again, this works fine some of the time, and as far as I know if not technically incorrect in any way? I am not explicitly defining parameters nor their sizes. If I assign qry.ParamByName('ADVERCODE').Size := 10; it does the same thing only with Size=10 in the trace, as one would expect. I must be missing something obvious here? Attached is a complete trace, in case it sheds some light (not for the attached trace, it was parameter 3, not 13 as I was testing something) hdsPromoImport_Trace.txt
  20. I have had issues before with master/detail relationships with FireDAC. Here is my situation: RadStudio 10.1-Berlin, connecting to Pervasive SQL via ODBC (although I have had similar problems with MSSQL-Native, and Access via ODBC. Master dataset is a simple TFDMemTable with a few fields, the important one being an invoice number named "InvNmbr". Detail dataset is an equally simple TFDQuery . In this case I only need ONE field in the query If I set the detail query SQL to a simple single-table "SELECT InvNmbr, TaxAmount1 FROM XTOTAL WHERE InvNmbr=:INVNMBR;", set MasterSource to my FDMemTable's datasource and set MaterFields to 'InvNmbr', I get the error in the subject line. HOWEVER, if I get the detail query SQL to include a join on two related tables (which returns an identical recordset) "SELECT XMASTER.InvNmbr, TaxAmount1 FROM XMASTER INNER JOIN XTOTAL ON XMASTER.InvNmbr=XTOTAL.InvNmbr WHERE XMASTER.InvNmbr=:INVNMBR", and set the MasterSource/MasterFields the same way, it works properly?! I am at a loss to explain this? Of note: - There is only the one parameter so why is FireDAC even messing about with a parameter #2? - I thought maybe the InvNmbr field and INVNMBNR parameters might be muddling things, so I tried fully qualifying it in the single table query (as "XTOTAL.InvNmbr") and it does the same thing. - In my ODBC database the XMASTER and XTOTAL tables are both keyed on InvNmbr, and one matching record per InvNmbr exists in each table. Code that does not work: fdqStatementMaster.SQL.Text := 'SELECT XTOTAL.InvNmbr, TaxAmount1 FROM XTOTAL WHERE XTOTAL.InvNmbr=:INVNMBR;'; fdqStatementMaster.MasterSource := dsCustomerStatement; fdqStatementMaster.MasterFields := 'InvNmbr'; fdqStatementMaster.Open(); Code that does work: PrepTempQuery(fdqStatementMaster, 'SELECT XMASTER.InvNmbr, TaxAmount1 FROM XMASTER INNER JOIN XTOTAL ON XMASTER.InvNmbr=XTOTAL.InvNmbr WHERE XMASTER.InvNmbr=:INVNMBR'; fdqStatementMaster.MasterSource := dsCustomerStatement; fdqStatementMaster.MasterFields := 'InvNmbr'; fdqStatementMaster.Open(); I am baffled and frustrated and will be extremely grateful for a nudge in the right direction.
  21. Nathan Wild

    Capturing Console Output

    I thought I remembered seeing a component or library in the GetIt repo that was devoted to running console commands and capturing their output? It was called "DOSBox" or something along those lines? I can not seem to find anything there now, or online. Am I crazy or does something like this already exist?
  22. Nathan Wild

    Capturing Console Output

    Thanks! This is exactly what I recalled seeing. It is not in MY GetIt though? I suppose you are right, not sure why I even bothered with GetIt!? Either way, the solution that David pointed me to, above will work nicely. Thanks!
  23. Nathan Wild

    Capturing Console Output

    Thank you. This is a much more elegant solution to what I was after. Cheers!
  24. Nathan Wild

    ICS FTP with TLS

    I am trying to upload files to an FTP server that uses explicit TLS. I have the connection working just fine in WinSCP with the encryption set to "TLS/SSL Explicit encryption". I am not sure how to accomplish this using ICS or Indy components (both appear to support this). Either I'm missing something or there does not appear to be very much in the comprehensive documentation department for ICS. If anyone here has experience with the ICS TsslFTPClient component can give me a nudge in the right direction it would be much appreciated.
  25. Nathan Wild

    ICS FTP with TLS

    Hmm... It looks like it is using the libss1-1_1.dll supplied with ICS... I was l expecting it to require libeay32. All good now, thanks to everyone who helped out.
×