Jump to content

weirdo12

Members
  • Content Count

    99
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by weirdo12

  1. If the TDFBatchMove.Reader property is a TFDBatchMoveTextReader when GuessFormat is called, how many rows does it read from a file to determine the format of the columns? The issue I have is an import file where a column normally has the value 1 and then say 10,000 rows in it will change to 2.2046 which kills the import.
  2. Yep. That particular property did not elude me.
  3. Oh boy, how did I miss that TFDBatchMove.AnalyzeSample property!? After more thought this morning, I doubt it's going to help with my problem. For example if the text file was like like this: "row_id","float_col" 1,1 2,2.2046 3,1 float_col will likely still be guessed to be an integer. I will have to look at the source.
  4. I assume you figured this out, eh?
  5. weirdo12

    Move objects to a second Data Module

    1. Open the project. 2. Open the TDataModule source file. 3. Change the Name property of the TDataModule to a new unique name. 3. Click File > Save As... and save it with a new file name. 4. Add the original TDataModule back to the project. In the new TDataModule you can start deleting components and event handlers. 1. Select the component you want to delete. 2. In the Object inspector, click the Events tab. 3. For any events that have been created for the component, double-click the event handler name. 4. Delete the code within the event handler BUT DO NOT delete the event handler. procedure TForm1.DataSource1DataChange(Sender: TObject; Field: TField); begin // delete the code in here but // leave everything between procedure and end; end; 5. Click File > Save and the handler will be removed.
  6. weirdo12

    Summary row at the end of select

    I should have said that an alternative way is to use IndexFieldNames instead of queries with parameters. Both methods produce the same results.
  7. weirdo12

    Summary row at the end of select

    IndexFieldNames in Query2 and Query3 should be set to CUSTNO. A parameter is not required. Query3.SQL = ' SELECT CUSTNO, sum(AMOUNTPAID) as TOTAL from ORDERS GROUP BY CUSTNO';
  8. weirdo12

    Summary row at the end of select

    If you are using TFDQuery, have you tried using the MasterSource property to connect Query2 to Query1? Query2.IndexFieldNames = fk_id_employee Query2.MasterFields = id Query2.MasterSource = Query1 You can use TFDLocalSQL and a TFDMemTable to do a summary of Query2.
  9. weirdo12

    Delphi not recognizing that a field exists

    Column LN does not exist in fdToTable. It may exist in your database but it's not in the table objects field collection.
  10. Use TFDScript with just the INSERT and DELETE statements.
  11. weirdo12

    Mysql connection problem

    Excellent!
  12. weirdo12

    Mysql connection problem

    Why are you using dbExpress? Is it an existing application that worked properly with another version of C++Builder?
  13. weirdo12

    FireDAC + TableNames with '$'

    Done. https://quality.embarcadero.com/browse/RSP-40382
  14. weirdo12

    FireDAC + TableNames with '$'

    This might be of some help to Dmitry I suppose. These also work: SELECT * FROM wares$rules "wares$ rules$" WHERE fldidxwarerule = :dummy_string_param SELECT * FROM wares$rules "wares $ rules $" WHERE fldidxwarerule = :dummy_string_param SELECT * FROM wares$rules "$" WHERE fldidxwarerule = :dummy_string_param SELECT * FROM wares$rules "$$$$" WHERE fldidxwarerule = :dummy_string_param SELECT * FROM wares$rules "$ $" WHERE fldidxwarerule = :dummy_string_param But these do not: SELECT * FROM wares$rules "$$" WHERE fldidxwarerule = :dummy_string_param SELECT * FROM wares$rules "$$$" WHERE fldidxwarerule = :dummy_string_param
  15. weirdo12

    FireDAC + TableNames with '$'

    To summarize/simplify... These work: SELECT * FROM wares$rules "wares$rules$" SELECT * FROM wares$rules WHERE fldidxwarerule = :dummy_string_param SELECT * FROM wares$rules "wares$$rules$$" WHERE fldidxwarerule = :dummy_string_param But when there is more than one single $ in the table name and there is a parameter in the query it does not: SELECT * FROM wares$rules "wares$rules$" WHERE fldidxwarerule = :dummy_string_param [FireDAC][Phys][PG][libpq] ERROR: syntax error at or near ":"
  16. weirdo12

    FireDAC + TableNames with '$'

    I am not seeing that problem with PostgreSQL 14.5 using FireDAC. This works fine too: SELECT "$$1$$".row_id, "$$1$$".description, :dummy_string_param, :dummy_int_param FROM t$1$$$$$$$$$ "$$1$$" LEFT OUTER JOIN "t1$t2$t3" ON "$$1$$".row_id = "t1$t2$t3".row_id Edit: This gives me a syntax error - only when parameters are included (which makes some sense): SELECT "$$1$$".row_id, "t1$t2$t3".row_id, "$$1$$".description, :dummy_int_param FROM t$1$$$$$$$$$ "$$1$$" LEFT OUTER JOIN "t1$t2$t3" ON "$$1$$".row_id = "t1$t2$t3".row_id [FireDAC][Phys][PG][libpq] ERROR: syntax error at or near ":" This works: SELECT "$$1$$".row_id, t1.row_id, "$$1$$".description, :dummy_int_param FROM t$1$$$$$$$$$ "$$1$$" LEFT OUTER JOIN "t1$t2$t3" t1 ON "$$1$$".row_id = t1.row_id
  17. I was going to point out the Data property but you said you only wanted to discuss CopyDataSet() 😄 Good to hear you've got a solution.
  18. From what I gather, you were assuming CopyDataSet would automatically create a new table in an SQLite database. Is that correct?
  19. Do you have a SELECT query in the Command property of the TFDTable component?
  20. What you might be wondering is how FireDAC interprets a column that is defined to have the data type IMAGE when that data is read from the database. IMAGE is not a SQLite data type. Have a look at this page: https://www.sqlite.org/flextypegood.html
  21. weirdo12

    FireDAC component TFDPhysODBCDriverLink missing

    Do you qualify to connect to the database? ADDITIONAL LICENSE TERMS APPLICABLE TO RAD STUDIO, DELPHI AND C++BUILDER PROFESSIONAL, PROFESSIONAL WITH MOBILE, COMMUNITY EDITION, AND PROFESSIONAL ACADEMIC EDITIONS In the event Licensee has obtained a RAD Studio, Delphi or C++Builder Professional, Professional with Mobile or Professional Academic product license then the following terms apply. Subject to the terms and conditions of this Agreement, Licensor grants to Licensee as the licensed user of the Product the limited right to use those portions of the Product identified as "dbExpress" and "FireDAC", in executable form only, to access a local database installed on the same machine as the Work. Licensee may not use that portion of the Product identified as "dbExpress" or "FireDAC" in association with a database located on a different machine other than the machine on which the Works are installed.
  22. weirdo12

    TFDScript.ExecuteALL does not seem to behave as expected

    Thanks for following up on the issue you were having.
  23. weirdo12

    SqllocalDB

    What are you using as the server name?
  24. weirdo12

    TFDScript.ExecuteALL does not seem to behave as expected

    My previous post was way off base. I'm still interested why you've had so much trouble getting TFDScript to work as you expected. I use it it with SQL Anywhere, SQLite, SQL Server, PostgreSQL and MySQL.
  25. weirdo12

    TFDScript.ExecuteALL does not seem to behave as expected

    Are you setting the TFDScript.ScriptOptions.CommandSeparator property? Are all SQL statements terminated? sql_script->SQL->Add("ALTER TABLE \"dba\".truck RENAME dsptch15_truck;"); What does the code you a using look like?
×