

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 ExcellentRecent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
TFDBatchMove with non NULL column in target table
TurboMagic replied to TurboMagic's topic in Databases
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... -
TFDBatchMove with non NULL column in target table
TurboMagic replied to TurboMagic's topic in Databases
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. -
TFDBatchMove with non NULL column in target table
TurboMagic replied to TurboMagic's topic in Databases
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. -
TFDBatchMove with non NULL column in target table
TurboMagic replied to TurboMagic's topic in Databases
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; -
TFDBatchMove with non NULL column in target table
TurboMagic replied to TurboMagic's topic in Databases
Thanks for that pointer. -
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?
-
How to read DNS TXT record contents?
TurboMagic replied to TurboMagic's topic in ICS - Internet Component Suite
Thanks for the info! That one works for me. My DNS is an inernal one so Google etc. don't help me... -
How to read DNS TXT record contents?
TurboMagic replied to TurboMagic's topic in ICS - Internet Component Suite
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. -
How to read DNS TXT record contents?
TurboMagic replied to TurboMagic's topic in ICS - Internet Component Suite
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. -
Ah! Yes, you're right! D2009 was Generics and Anonymous methods...
-
How to read DNS TXT record contents?
TurboMagic replied to TurboMagic's topic in ICS - Internet Component Suite
Thanks, this looks like what I'm after. -
How to read DNS TXT record contents?
TurboMagic replied to TurboMagic's topic in ICS - Internet Component Suite
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? -
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.
-
As far as I remember Win64 compiler was introduced with D2009 already.
-
Delphi Code Coverage WIzard Plus V2.0 released
TurboMagic replied to TurboMagic's topic in Delphi Third-Party
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.