Jump to content

weirdo12

Members
  • Content Count

    99
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by weirdo12

  1. weirdo12

    File access denied

    Thanks for the update.
  2. weirdo12

    FireDac Array DML Update query - omitting certain fields

    If you want to be as flexible/portable as possible you could consider using a FireDAC macro like this: email = { fn IFNULL(:EMAIL, email) }
  3. weirdo12

    FireDac Array DML Update query - omitting certain fields

    😄 So just supply the current value when the value doesn't change. I do like the statement that uses COALESCE because it makes it very obvious that that is what is happening. Are you targeting a specific database server?
  4. weirdo12

    C++Builder 12 - Windows only?

    They are retooling the C++ compiler chain. I get the impression that C++ is becoming more important - not less - even if it might seem like a 2 steps forward, one step back (for the moment). My gut feeling is the future has never been brighter for C++Builder.
  5. weirdo12

    FireDac Array DML Update query - omitting certain fields

    Why not just supply the current value where you don't want a value to change?
  6. weirdo12

    RAD Studio 12.0 / Clang / GoogleTests

    Thank you, Roger.
  7. We still use an old Northern Telecom phone system and have an operational fax machine on a stand alone line here at work here in Toronto. 😄
  8. Great to hear that things are getting fixed up!
  9. I'm still surprised it hadn't been mentioned already as a possible cause...
  10. I just did a search of the terms 'ransom' and 'ransomware' and they haven't appeared in this thread. I'm kinda surprised. 😉 You'd think that the documentation would be back up by now.
  11. weirdo12

    Help with Query at run time

    You can build your file name like this as well: var file_name : String; file_name := TPath.Combine('D:\Delphi_11_Community\MyProjects\Dinobase\dino_images', sName); file_name := TPath.ChangeExtension(file_name, "jpg"); dinoImage.Picture.LoadFromFile(file_name);
  12. weirdo12

    Help with Query at run time

    Drop a TFDQuery component on your form. If it's the first one, it will be named FDQuery1. Set FDQuery1.Connection property to the TFDConnection you use to connect to the SQLite database. Then, in your code, replace Query. with FDQuery1.
  13. In the version that works, what happens if you don't call fdqImportData .Close after copying the data to the TFDMemTable?
  14. I'm glad you found a solution. You could have a look at this thread and see if there's anything that might help with the original problem:
  15. And you are using the MARS=Yes parameter on the connection? Have you tried version 17 of the SQL Server ODBC driver?
  16. Try executing you commend on your TFDConnection and see what you get: FDConnection1.ExecSQL('UPDATE dbo.TDexAllocationTicketOut SET ReadDT = GETDATE() WHERE IDInt = :idInt', [fdqImportData.FieldByName('IdInt').AsInteger]); You might have to fix my Pascal. I didn't test it.
  17. weirdo12

    FireDAC SQLite MetaDefCatalog

    Excellent!
  18. weirdo12

    FireDAC SQLite MetaDefCatalog

    https://docwiki.embarcadero.com/RADStudio/Athens/en/Preprocessing_Command_Text_(FireDAC)
  19. weirdo12

    FireDAC SQLite MetaDefCatalog

    select {IF MSSQL}dbusers.dbo.{FI}users.name, {IF MSSQL}dbusers.dbo.{FI}athentications.read, etc.
  20. weirdo12

    FireDAC SQLite MetaDefCatalog

    unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, FireDAC.Stan.Intf, FireDAC.Stan.Option, FireDAC.Stan.Error, FireDAC.UI.Intf, FireDAC.Phys.Intf, FireDAC.Stan.Def, FireDAC.Stan.Pool, FireDAC.Stan.Async, FireDAC.Phys, FireDAC.Phys.SQLite, FireDAC.Phys.SQLiteDef, FireDAC.Stan.ExprFuncs, FireDAC.VCLUI.Wait, FireDAC.Phys.SQLiteWrapper.Stat, Data.DB, FireDAC.Comp.Client; type TForm1 = class(TForm) FDConnection1: TFDConnection; FDPhysSQLiteDriverLink1: TFDPhysSQLiteDriverLink; procedure FDConnection1AfterConnect(Sender: TObject); procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.FDConnection1AfterConnect(Sender: TObject); begin var count : Integer; // this will create mydb.sqlite if it does not exist FDConnection1.ExecSQL('ATTACH DATABASE ''C:\Users\Public\Documents\mydb.sqlite'' AS mydb'); FDConnection1.ExecSQL('CREATE TABLE IF NOT EXISTs mydb.t1 (c1 TEXT)'); FDConnection1.ExecSQL('INSERT INTO mydb.t1 (c1) VALUES (lower(hex(randomblob(16))))'); count := FDConnection1.ExecSQLScalar('SELECT COUNT(*) FROM mydb.t1'); end; procedure TForm1.FormCreate(Sender: TObject); begin FDConnection1.Params.Database := ':memory:'; FDConnection1.Connected := true; end; end.
  21. weirdo12

    FireDAC SQLite MetaDefCatalog

    Why do you need to use the mydb schema name?
  22. weirdo12

    Help to find database error

    Can you copy and paste or attach all of your .pas source code here once again.
  23. weirdo12

    FireDAC SQLite MetaDefCatalog

    schema-name == The database in which the new table is created. Tables may be created in the main database, the temp database, or in any attached database. https://sqlite.org/lang_attach.html
  24. It's weird. If I send multiple PDF attachments using smtp.outlook.com or smtp.office356.com, all attachments appear identical to the last file attached. For example, if I send 3 attachments, the first 2 will appear to contain the contents of the last file that was attached to the email. The file names are not altered. I've tried sending .ini and xls files too. Same thing happens. I can send a message as expected using smtp.gmail.com, Mailjet, SendGrid and our ISPs smtp server. Nothing in my code detects what server is used to send a message.
×