Jump to content

Die Holländer

Members
  • Content Count

    155
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Die Holländer

  1. Die Holländer

    ...cannot contact a domain controller..

    Would be nice when you tell us what resolved the issue..
  2. Die Holländer

    ...cannot contact a domain controller..

    What is your MSSQL server version? I Remember I had some problems when I used in the config under "Server" the servername instead of the ServerIP. Maybe you check that also. So, not xx.xx.edu but the real IP of the server, like 102.x.x.x Basically the FireDac config is creating a connectstring. Since you can login with the MS SQL Server Management Studio you can ask for the connectstring when logged in: SELECT 'data source=' + @@SERVERNAME + ';initial catalog=' + DB_NAME() + CASE type_desc WHEN 'WINDOWS_LOGIN' THEN ';trusted_connection=true' ELSE ';user id=' + SUSER_NAME() END FROM sys.server_principals WHERE name = suser_name() See also: ConnectStrings
  3. Die Holländer

    A gem from the past (Goto)

    In the early BASIC times, like for the ❤️ ZX-Spectrum ❤️ there were no functions or procedures but instead they introducted a way to jump to another part of the source and return to the next line after the jump. The statements: Gosub and Return. 10 LET A=0 20 PRINT "ENTER A NUMBER: " 30 INPUT N 40 GOSUB 100 50 PRINT "THE RESULT IS ";A 60 END 100 A = N * 2 110 RETURN
  4. Die Holländer

    WebUI framework: Technical preview. Part 1.

    Any link to the webUI website?
  5. Die Holländer

    ...cannot contact a domain controller..

    This is the config that works here.. Note, the DatabaseName is added two times. (Also MetaDefCatalog) "dbo" as the MetaDefSchema. Play with the OSAuthent and MARS properties. (switch Yes/No)
  6. Die Holländer

    RAD Studio 12.1 Athens Patch 1 Available

    I'm still on 11.3 and soon will switch to 12. I just see in the video that this new JSON feature is now in Delphi 12... Is it working as I think it's working ?? After reading the JSON it's possible to directly access the keynames (email, address.street, ..) to get the values as weaktype languages can do, like Javascript.
  7. Die Holländer

    Looking for a couple of good "starter" Delphi books

    Books by dr. Bob (Bob Swart)
  8. Whatever you program in Delphi, compared with most other languages, it will stay RAD and you can focus on you actual problem instead for example fighting how to put things on the screen. It takes the Online department, with Node, Javascript and pumping JSON files through the internet, with three developers (backend, frontend and HTML/CSS designer) about one week for one screen. They calling Delphi old fashioned while I look to their source and problems as if they still live in the 1980's.
  9. Die Holländer

    {$Defines xxxx} not working at design time..

    I have noted something like this by the {$IFDEF DEBUG} switch in D11.3. When switching the "Build Configurations" from Debug to Release nothing happens. When staying in the Unit and do Compile or Build nothing happens. but When I switch in the editor from that source/unit tab to another source and back it works and the editor will gray-out the proper sourcecode.
  10. If you just did a first login then you have to wait some time before you can see reports...
  11. Die Holländer

    C Libraries to Delphi

    Yes, but the use is not to get a clean 100% translation. It will give you a lot of insight of the differences between Delphi/Pascal and C keywords/declarations etc.. >It will probably be a bit stubborn since it's so much code, so you'll have to step through it Yes, like the programmer that has to translate the code..
  12. Die Holländer

    C Libraries to Delphi

    Yes, try Chat-GPT to translate sourcecode. It is quite good in it..
  13. For a (very) long time I use dataobjects to query the database and I'm still very happy about it. I would otherwise get mad hiding all the actual queries away from sourcecode by adding them in the TFDQuery properties. If you do it in the classic way using a datamodule then in the long run with large applications you will end up with a lot of TFDQueries on the module and your application will start very slow. For example to use the DataObject looks like this: MyDataObject:=TMyDataObject.Create('DatabaseName'); try MyDataObject.Code:='1234'; If not MyDataObject.qryMyName.eof then Begin txtEdit.Text:=MyDataObject.Name; End; Finally MyDataObject.Free; End; You can decide to make such dataobject for every table in your database. Use the main table if you have Joins in the Query. If you have a new query you add a new Setter in the object. In this way you can reuse the queries in your entire code. (or in a comple other project/application) For example if your TFDQuery is in the Public section you can still do things in the GUI like: MyDBGrid.Datasource.DataSet:=MyDataObject.qryMyName; Note: If you need more parameters in your query you can create the property like: property CodePersonsID[aCode: Integer] : Integer write SetCodePersonsID; procedure SetCodePersonsID(aCode: Integer; aPersonsID: Integer); MyDataObject.CodePersonsID[45]:=99888; A simple DataObject can look like this: TMyDataObject = Class(TObject) Private fDataBaseName: String; protected procedure SetCode(aCode : String); function GetCode : String; function GetName : String; Public qryMyName : TFDQuery; procedure All; property Code : String read GetCode write SetCode; property Name : String read GetName; Constructor Create(aDataBaseName: String); Destructor Destroy; Override; End; implementation uses SysUtils; Constructor TMyDataObject.Create(aDataBaseName: String); Begin Inherited Create; fDataBaseName:=aDataBaseName; //Create here your own TFDQuery.Create procedure.. database_initQuery(fDataBaseName, 'qryMyName', qryMyName); End; Destructor TMyDataObject.Destroy; Begin If qryMyName<>NIL then qryMyName.Free; Inherited Destroy; End; procedure TMyDataObject.All; Var SQLText : String; Begin SQLText:='select * from "MyTable" '; qryMyName.Active:=False; qryMyName.SQL.Clear; qryMyName.SQL.Add(SQLText); qryMyName.Active:=True; qryMyName.First; End; procedure TMyDataObject.SetCode(aCode : String); Var SQLText : String; Begin SQLText:='select * from "MyTable" where Code= :CODE'; qryMyName.Active:=False; qryMyName.SQL.Clear; qryMyName.SQL.Add(SQLText); qryMyName.ParamByName('CODE').AsString:=aCode; qryMyName.Active:=True; qryMyName.First; End; Function TMyDataObject.GetCode : String; Begin With qryMyName do Begin if FindField('code')<>NIL then Result:=FieldByName('code').AsString else Result:=''; End; End; Function TMyDataObject.GetName : String; Begin With qryMyName do Begin if FindField('name')<>NIL then Result:=FieldByName('name').AsString else Result:=''; End; End;
  14. Die Holländer

    D5 data file misread in XE program

    I just testing this ChatGPT IDE implementation and I thought let's give it a shot. //To ensure that XE interprets the strings correctly, //you can try explicitly setting the encoding when reading //the strings from the data file. //Here's an example of how you could modify your code to //read the strings as Windows 1252 encoded: delphi procedure TForm1.FormActivate(Sender: TObject); var morphlex: file of string[32]; str: AnsiString; nooflexrecs: Integer; begin AssignFile(morphlex, 'MorphIr.dat'); Reset(morphlex); nooflexrecs := FileSize(morphlex); ShowMessage('Data file contains ' + IntToStr(nooflexrecs) + ' records'); // Read strings using Windows 1252 encoding while not Eof(morphlex) do begin BlockRead(morphlex, str, SizeOf(str)); // Convert string to Unicode if needed ShowMessage(TEncoding.GetEncoding(1252).GetString(PAnsiChar(str))); end; CloseFile(morphlex); end; //In this updated code snippet, we use `AnsiString` to //read the string data from the file as it is not Unicode. //We then convert the `AnsiString` to Unicode using //the `TEncoding.GetEncoding(1252).GetString` method to //interpret the Windows 1252 encoded strings correctly. //Please note that this code assumes that the string data //in the file is in Windows 1252 encoding. //If the actual encoding is different, you may need to //adjust the encoding parameter accordingly
  15. Die Holländer

    ChatGPT plug-in for RAD Studio.

    The plug-in is working great and the warning is indeed not a problem. 👍 I've downloaded the ZIP from GitHub and build/installed the *.dpk file and that went very smooth. The message I got directly after installing the plug-in. From the IDE main menu I opened the Chat-GPT settings and pasted the API-key and did Save/Close without any other input in the setting dialog.
  16. Die Holländer

    ChatGPT plug-in for RAD Studio.

    What makes it that it thinks that I use an offline server?
  17. Die Holländer

    kuLibrary

    I'm almost sure that nobody dares to click on this link...
  18. Die Holländer

    What new features would you like to see in Delphi 13?

    BING: Welche Fahrradverleihe gibt es in Braunsbedra? Verkenne In Braunsbedra, gibt es einige Fahrradverleihe, die Ihnen hochwertige Räder für die Erkundung der wunderschönen Seenlandschaft anbieten. Hier sind einige Optionen: Radmanufaktur: Die Radmanufaktur in Merseburg (Hölle 1, 06217 Merseburg) bietet E-Bikes und andere Fahrräder. Die Öffnungszeiten sind dienstags bis freitags von 12:00 bis 18:00 Uhr und samstags von 09:00 bis 13:00 Uhr1. Bike-dom: Bike-dom in Naumburg (Marienstr. 1, 06618 Naumburg) verleiht ebenfalls Fahrräder. Sie sind montags bis freitags von 10:00 bis 18:00 Uhr und samstags von 09:00 bis 12:00 Uhr geöffnet2. Walk & Bike UG: Die Walk & Bike UG in Naumburg (Georgenberg 5, 06618 Naumburg) bietet Fahrräder für Touren um den Geiseltalsee. Sie sind montags bis freitags von 09:00 bis 17:00 Uhr und samstags von 09:00 bis 12:00 Uhr geöffnet3. Alle diese Verleihe ermöglichen es Ihnen, die malerische Umgebung zu erkunden und den Geiseltalsee auf dem ca. 25 km langen Rundweg zu genießen. Wählen Sie zwischen Kinderrädern, sportlichen MTBs, Trekking- und gemütlichen City-Bikes mit oder ohne E-Antrieb. Viel Spaß beim Radfahren! 🚴‍♀️🌞
  19. Die Holländer

    Encrypt ini file

    You can consider not to use the INI but the Windows Credential Manager for storing information. Very easy to use (read/write) from Delphi.
  20. Die Holländer

    Does FireDAC allow more than one connection?

    Which database?
  21. Die Holländer

    Extend Standard VCL

    >>without creating a new component? >>and I think about a new VCL. Sounds a bit strange.. Don't modify the original VCL component (if you have the Delphi sourcecode..) Modifying_Existing_Controls
  22. This native client 11 driver was for us the only one that was usable for 2012, 2014 and maybe for your 2017 too. We went to the latest MSSQL sever recently and for that server we needed one of the latest driver and indeed the Native Client 11 driver will not work anymore. We use SQL ODBC 18 at the moment. I had a machine that was not working good either and the trick was to install the MSSQL Server Management Studio on that machine. The Studio also installs a driver and other dependencies.
  23. Like Peter said. Check your idx AFTER the call statement. Tested in Delphi 11.3
  24. Die Holländer

    Crowdstrike antivirus killing Delphi

    Sometimes this happens. Whitelist the App in the virus software.
×