Jump to content

TurboMagic

Members
  • Content Count

    211
  • Joined

  • Last visited

  • Days Won

    9

TurboMagic last won the day on December 29 2022

TurboMagic had the most liked content!

Community Reputation

87 Excellent

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. TurboMagic

    TFDBatchMove with non NULL column in target table

    Ok, I have a solution now, thanks to Uwe's suggestion: If I use a DataSetWriter instead of a SQL one, I can assign a TFDTable component to that one, which has the TableName property and which calls OnNewRecord just fine. In that one can I check the table name and if it's one of the tables where not Null columns have been added later on, I can check these columns for 'not NULL' and assign a default value there. In my tests the DB functionality of having default values didn't work. Maybe the TFDBatchMove added NULL values itsself for these additional columns...
  2. TurboMagic

    TFDBatchMove with non NULL column in target table

    Ok, the plan with the TFDBatchMoveDataSetWriter isn't so easy. It lacks the .TableName property and it looks like I need to assign a TDataSet to that one. Seems more investigation is required.
  3. TurboMagic

    TFDBatchMove with non NULL column in target table

    Well, when I provide an SQL query for the reader as you describe I'm getting more inflexible when adding new fields to that table in comparison to only having to deal with cases where a "not NULL" for a column needs to be dealt with. Since Uwe hints that a SQLWriter will not call OnNewRecord I will try the TFDBatchMoveDataSetWriter now. If that calls this event and lets me call FieldByName it should do.
  4. TurboMagic

    TFDBatchMove with non NULL column in target table

    I tried OnNewRecord now, but it doesn't seem to get called. What am I'm doing wrong? Here I assign OnNewRecord via code, since FWriter is created at runtime: FWriter.FDDataSet.OnNewRecord := OnNewRecord; Here's the implementation of that event: procedure TDBCopy.OnNewRecord(DataSet: TDataSet); begin if (FWriter.ActualTableName.ToUpper = 'KASSE_EINSTELLUNGEN') then begin DataSet.FieldByName('DRAWBACK_CALCULATION').AsInteger := 0; end; if (FWriter.ActualTableName.ToUpper = 'KASSE_PRINTSETTINGS') then begin DataSet.FieldByName('PRINT_SMALL_BONS').AsInteger := 0; end; end; But when running FBatchMove.Execute; the breakpoint in the event is never ever called. And the way my application crashes indicates that it's actually never run. Do I need to activate something somewhere? I only assign TableNames to FReader.TableName and FWriter.TableName and then run FBatchMove.Execute;
  5. TurboMagic

    TFDBatchMove with non NULL column in target table

    Thanks for that pointer.
  6. I'm using D11.3 and a Firebird database. I use TFDBatchMove to copy rows from one database (the old one before the update of the application) to the empty DB installed with the update. Now when that new database contains a new column declared as non Null it crashes. How to prevent this or how to deal with this?
  7. TurboMagic

    How to read DNS TXT record contents?

    Thanks for the info! That one works for me. My DNS is an inernal one so Google etc. don't help me...
  8. TurboMagic

    How to read DNS TXT record contents?

    Ok, I can query this TXT record now, when I know the IP of one of our internal DNS servers. But how to find that one out? Yes, cmd.exe -> ipconfig /all would tell me, but I need to implement this internally. I tried to understand what THTTPCli does to determine that, but I failed to do so. Is there some other easier solution available to get such an IP-address? I know that I can have several connections and thus several DNS servers. but I think I can manage when I get a list of all those.
  9. TurboMagic

    How to read DNS TXT record contents?

    Well, I won't use this for e-mail, but the data will most likely not change often, if at all. But this is good to know for first tests.
  10. TurboMagic

    ICS V9.0 announced

    Ah! Yes, you're right! D2009 was Generics and Anonymous methods...
  11. TurboMagic

    How to read DNS TXT record contents?

    Thanks, this looks like what I'm after.
  12. TurboMagic

    How to read DNS TXT record contents?

    Ok, time to upgrade. I see. Thanks! What I learned is, that TXT records can have a name and thus I could retrieve that one with this?
  13. I have D10.4.2 with ICS 8.65 installed (having not had any need for ICS in the recent years I only got aware of V9.0 now). I would like to read out the contents on a DNS TXT record. For this I looked at the OverbyteICSNSLookup sample application. While this can display a bunch of stuff read out from DNS I don't see where the contents of a TXT record if accessed. I don't want to parse the raw DNS answer. I guess there's some simpler way available. The only string like thing I found was AnswerName but that doesn't really sound like it.
  14. TurboMagic

    ICS V9.0 announced

    As far as I remember Win64 compiler was introduced with D2009 already.
  15. TurboMagic

    Delphi Code Coverage WIzard Plus V2.0 released

    Well, I'd be gratefull if somebody could grab that new version from development branch and test the new additions to find out if I understood and implemented those correctly.
×