Jump to content

weirdo12

Members
  • Content Count

    145
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by weirdo12

  1. 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?
  2. weirdo12

    RAD Studio 12.0 / Clang / GoogleTests

    Thank you, Roger.
  3. 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. 😄
  4. Great to hear that things are getting fixed up!
  5. I'm still surprised it hadn't been mentioned already as a possible cause...
  6. 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.
  7. 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);
  8. 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.
  9. In the version that works, what happens if you don't call fdqImportData .Close after copying the data to the TFDMemTable?
  10. 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:
  11. And you are using the MARS=Yes parameter on the connection? Have you tried version 17 of the SQL Server ODBC driver?
  12. 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.
  13. weirdo12

    FireDAC SQLite MetaDefCatalog

    Excellent!
  14. weirdo12

    FireDAC SQLite MetaDefCatalog

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

    FireDAC SQLite MetaDefCatalog

    select {IF MSSQL}dbusers.dbo.{FI}users.name, {IF MSSQL}dbusers.dbo.{FI}athentications.read, etc.
  16. 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.
  17. weirdo12

    FireDAC SQLite MetaDefCatalog

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

    Help to find database error

    Can you copy and paste or attach all of your .pas source code here once again.
  19. 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
  20. 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.
  21. weirdo12

    Send multiple attachments with smtp.office365/outlook.com

    Thanks, Remy. That's the answer I expected and what I had already told the customer. I really hesitated asking the question but thought I better before telling the customer they'd need to contact Microsoft.
  22. weirdo12

    New Firebird 4 datatype "TIMESTAMP WITH TIMEZONE"

    https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Connect_to_Firebird_(FireDAC)
  23. If you use a suitable column type alias in your SQLite table definition, FireDAC will figure out the correct field data type to use. DATE | SMALLDATE dtDate DATETIME | SMALLDATETIME dtDateTime TIMESTAMP dtDateTimeStamp TIME dtTime https://docwiki.embarcadero.com/RADStudio/Alexandria/en/SQLite_support_in_RAD_Studio
  24. Do you need to store exit_time value as INTEGER or would you prefer it stored in a format that you can read (like yyyy-mm-dd)?
×