Jump to content

emailx45

Members
  • Content Count

    498
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by emailx45

  1. Another thing, if the "Events" have same signature (same params on calls) you can create a equal procedure and sign it in your "SpinEdit.OnChange" or any other events pertinent in fact, same params "TYPE" the param names can be others procedure TForm1.SpinEdit1Change(Sender: TObject); // signature of this event // then you can create on procedure on "Published" section with equal signature type TForm1 = class(TForm) SpinEdit1: TSpinEdit; SpinEdit2: TSpinEdit; SpinEdit3: TSpinEdit; SpinEdit4: TSpinEdit; DataSource1: TDataSource; DataSource2: TDataSource; DataSource3: TDataSource; DataSource4: TDataSource; procedure FormCreate(Sender: TObject); private // published procedure prcMySpinEditsChange(Sender: TObject); public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.FormCreate(Sender: TObject); begin SpinEdit1.Tag := 1; // to control the "case", but, "Tag" is not good for that, at all! SpinEdit2.Tag := 2; SpinEdit3.Tag := 3; SpinEdit4.Tag := 4; // SpinEdit1.OnChange := prcMySpinEditsChange; SpinEdit2.OnChange := prcMySpinEditsChange; SpinEdit3.OnChange := prcMySpinEditsChange; SpinEdit4.OnChange := prcMySpinEditsChange; end; procedure TForm1.prcMySpinEditsChange(Sender: TObject); var lFindCompIfExist: TComponent; begin // // you should have some way to verify the current values - then, your class should do it, or, in your code like this: // lFindCompIfExist := Self.FindComponent(Format('DataSource%d', [(Sender as TSpinEdit).Tag])); // if not(lFindCompIfExist = nil) and (lFindCompIfExist is TDataSource) then begin ShowMessage( { } Format('DataSource name = %s', [ { } lFindCompIfExist.Name { } ]) { } ); end; // else --- what I should do? end; hug
  2. maybe using "polyphormism" to "DBSource, then, depending on the current class in use, the variable (polypformic) will have its value defined. Would be that? Marco Cantu github with sample of his books: https://github.com/MarcoDelphiBooks
  3. Microsoft Windows did this for editions and editions, and nobody let you buy it! Microsoft has asked this question countless times in many editions of MSWindows, and no one has really stopped using it for that! The irrelevance of some facts is disheartening, and seeing someone attach so much importance to them makes them even more disheartening! Mostly, starting with someone who has his own genetic imperfection in his DNA. Errror is Error, Warning is Warning! does not matter how many! hug
  4. thanks @Uwe Raabe for confirm my suppose: 1 + 1 + programmer drinking beer while pressing the compile button ... = 3 errors
  5. emailx45

    Library Path disappeared??

    Firstly, I dont know! Because I dont know about what you want before or any other info! You see? Second, all software, good software company, save your default values in "Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\" Embarcadero, save in "Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Embarcadero" Then, you can copy the "some" default values. Of course, if you install any component suit in your IDE, would be ideal re-install it later. If you DONT installed any add-on or third components suites in your IDE, this can be a "Embarcadero BUG in RAD 10.4" - some peoples report it try and see if solve! if not, my tip "killer" Uninstall RAD restart MSWindows, delete all residual folders/files (include hided in "C: \ ProgramData" and keys on Registry restart Re-Install RAD Now, my tip more "killer" DONT INSTALL YOURS SOFTWARE (WHEN POSSIBLE) IN "PROGRAMS FILES" (64 OR 32 BITS - x86) because this folder always needs Admin privilegies Solution: create a new folder in C:\ - for example: c:\Embarcadero now, install your RAD into it include yours components suites this is valid for another softwares. in my case, I use: c:\EMB\RADRio\200\..... c:\EMB\FastReport c:\EMB\UniDAC etc... c:\MyProgs\VirtualBox c:\MyProgrs\WinRAR etc...
  6. emailx45

    Library Path disappeared??

    with RAD 10.4 all it's normal! If the string is very long, then, it can have been "truncated".... Possible solution: Open your REGISTRY go to key where the "Library Path" is in -- possible: Computer\HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\<<IDE number>>\Library\Win32 do backup this key (export it for your disk for example) delete some chars until it appears in your RAD then, you'll have certains about this the site of the "PATH" is the problem, then, it must be reduced, that is, it should not be necessary. Often, when we install components on the RAD, and then uninstall, their "PATH" still remains registered on these keys, however, in gray, indicating that the path is no longer valid. For that, there is the button "Delete Invalid Path" ... you see me? hug
  7. try: first, copy the "WinDOS.pas" for your project folder, that way you dont need put it in your "Library Path" and "Browse Path" in your Delph platform second, this unti is for "16bits" platform, then, in MSWindows 64bits you'll can have many problems because the "types" used! it was done to Windows95 (if Im not wrong) third, now, just use the clause "USES windos;" on "interface or implementation section" or be, where it is necessary access the types declared in "WinDOS" unit Some like this: unit Unit2; interface implementation uses WinDOS; procedure prcXXXXX; var lVarXX: xxxTypeNecessary; begin lVarXX := doserror; end; end. At that time, "namespace" was not used when naming Delphi units. Example: RAD 10 ---> Vcl.Forms.pas ---- namespace "Vcl" to indicate that this unit should only be used for VCL framework project! Delphi 7 --- Forms.pas ---- without the namespace as there was no need at that time, as the only existing framework (by default) was for VCL projects Note: "WinDows" may have access to other units (open it and verify), so put them all in your project folder, or list them in Delphi CE's "Library Path" and "Library Browse" hug
  8. the third error, stay to programmer that: who made the "mistake" of compiling his code and didn't even pay attention to what he was doing. 1 + 1 + programmer drinking beer while pressing the compile button ... = 3 errors NOTE: don't drink when driving your beast pc!
  9. my sample based on tip by Fernando Rizzato (MVP Embarcadero lead South America) unit uFormMain; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, System.Permissions, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Layouts, FMX.Controls.Presentation, FMX.StdCtrls, FMX.ListBox, FMX.Objects, FMX.ScrollBox, FMX.Memo, FMX.Media; type TfrmFormMain = class(TForm) lytFormMain: TLayout; lytFormMainToolBar: TLayout; lytFormMainClientArea: TLayout; tbarFormMainMenu: TToolBar; sbtnCAMStartCamera: TSpeedButton; cmbboxCAMDevices: TComboBox; imgVideoCapture: TImage; mmMyLog: TMemo; sbtnCAMStopCamera: TSpeedButton; procedure FormCreate(Sender: TObject); procedure sbtnCAMStartCameraClick(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure imgVideoCaptureTap(Sender: TObject; const Point: TPointF); procedure sbtnCAMStopCameraClick(Sender: TObject); procedure cmbboxCAMDevicesChange(Sender: TObject); procedure FormResize(Sender: TObject); procedure FormActivate(Sender: TObject); private procedure prcMyLog(lText: string); // procedure prcCAMDevicesSetting; procedure prcCAMStartCapture; // {$IF DEFINED(ANDROID)} procedure prcPermissionsResulted(Sender: TObject; const APermissions: TArray<string>; const AGrantResults: TArray<TPermissionStatus>); procedure prcDisplayRationale(Sender: TObject; const APermissions: TArray<string>; const APostRationaleProc: TProc); {$ENDIF} // procedure prcCAMSampleBufferReady(Sender: TObject; const ATime: TMediaTime); procedure prcCAMSampleBufferSync; public end; var frmFormMain : TfrmFormMain; FFormTopPositionBeforeResize: integer = 0; implementation {$R *.fmx} { This sample, will use the "TVideoCaptureDevice" (class base to "TCameraComponent") directly!!! This class is defined in "FMX.Media.pas" // TDialogService.ShowMessage() used for dont block main-thread! } // uses FMX.DialogService {$IF DEFINED(ANDROID)} , FMX.Helpers.Android, Androidapi.JNI.JavaTypes, Androidapi.Helpers, Androidapi.JNI.OS {$ENDIF} ; // var lMyCAMDevice : TVideoCaptureDevice; lMyCAMPermission: string; function fncMyIIF(lBooleanExpr: boolean; lTextTrue, lTextFalse: string): string; begin result := lTextFalse; // if lBooleanExpr then result := lTextTrue; end; procedure TfrmFormMain.prcMyLog(lText: string); begin mmMyLog.Lines.Add(lText); end; procedure TfrmFormMain.cmbboxCAMDevicesChange(Sender: TObject); begin {$IF NOT DEFINED(ANDROID)} try lMyCAMDevice := nil; // lMyCAMDevice := TVideoCaptureDevice(TCaptureDeviceManager.Current.GetDevicesByName(cmbboxCAMDevices.Selected.Text)); // sbtnCAMStartCamera.Enabled := not(lMyCAMDevice = nil); // except on E: Exception do prcMyLog('Error Start CAM' + #13#10 + E.Message); end; {$ENDIF} end; procedure TfrmFormMain.FormActivate(Sender: TObject); begin {$IF NOT DEFINED(ANDROID)} FFormTopPositionBeforeResize := Self.Top; { when the user move the forms, needs change it too! } {$ENDIF} end; procedure TfrmFormMain.FormClose(Sender: TObject; var Action: TCloseAction); begin if not(lMyCAMDevice = nil) then begin {$IF DEFINED(ANDROID)} // if PermissionsService.IsEveryPermissionGranted([lMyCAMPermission]) then; if PermissionsService.IsPermissionGranted(lMyCAMPermission) then {$ENDIF} begin if (lMyCAMDevice.State = TCaptureDeviceState.Capturing) then lMyCAMDevice.StopCapture; end; // // lMyCAMDevice.Free; // if necessary!!! end; end; procedure TfrmFormMain.FormCreate(Sender: TObject); begin {$IF NOT DEFINED(ANDROID)} FFormTopPositionBeforeResize := Self.Top; {$ENDIF} // // // Form.OnCreate is not better place to "critial" procedure! // Here, only basic procedures! // Self.Position := TFormPosition.ScreenCenter; sbtnCAMStopCamera.Text := 'Stop Cam'; // prcCAMDevicesSetting; // if necessary, move it for another place! // if not(lMyCAMDevice = nil) then begin prcMyLog(lMyCAMDevice.ToString); // unfortunatelly, dont have Name or Description on Mobile Android // sbtnCAMStartCamera.Enabled := True; end else prcMyLog('MyCAMDevice = nil'); end; procedure TfrmFormMain.FormResize(Sender: TObject); begin {$IF NOT DEFINED(ANDROID)} if (Self.Height <= 480) then begin Self.Top := FFormTopPositionBeforeResize; Self.Height := 480; end; // if (Self.Width <= 640) then Self.Width := 640; // to avoid that ComboBox is gone...! {$ENDIF} end; procedure TfrmFormMain.imgVideoCaptureTap(Sender: TObject; const Point: TPointF); {$IF DEFINED(ANDROID)} var lObject: string; {$ENDIF} begin {$IF DEFINED(ANDROID)} // for "TAPing" tests! // lObject := ''; // if not(Sender = nil) then lObject := Sender.ClassName; // TDialogService.ShowMessage( { } Format('Object=%s, Point X=%f, Y=%f, V[0]=%f, V[1]=%f, IsZero=%s', [ { } lObject, Point.X, Point.Y, Point.V[0], Point.V[1], { } fncMyIIF(Point.IsZero, 'is zero', 'is not zero') { } ])); {$ENDIF} end; procedure TfrmFormMain.prcCAMDevicesSetting; {$IF NOT DEFINED(ANDROID)} var DeviceList: TCaptureDeviceList; i : integer; {$ENDIF} begin {$IF DEFINED(ANDROID)} cmbboxCAMDevices.Visible := False; try // Normally, there is only 1 cam in Mobile! // // NOTE: any try to read or change any property from CAM, NEEDS "permissions"!!! lMyCAMDevice := TCaptureDeviceManager.Current.DefaultVideoCaptureDevice; // lMyCAMDevice.OnSampleBufferReady := prcCAMSampleBufferReady; // showing our video on TImage // // DONT TRY READ or CHANGE any property from CAMDevice here!!! // Like: Start or Stop, Quality, IsDefault, etc... // Only later your "permissions" to be given by user!!! except on E: Exception do prcMyLog('Error CAM definition' + #13#10 + E.Message); end; {$ELSE} DeviceList := TCaptureDeviceManager.Current.GetDevicesByMediaType(TMediaType.Video); // for i := 0 to (DeviceList.Count - 1) do cmbboxCAMDevices.Items.Add(DeviceList[i].Name); {$ENDIF} end; {$IF DEFINED(ANDROID)} // DisplayRationale and PermissionsResulted is used only mobile! procedure TfrmFormMain.prcDisplayRationale(Sender: TObject; const APermissions: TArray<string>; const APostRationaleProc: TProc); var lRationaleMsg: string; i : integer; begin for i := 0 to high(APermissions) do begin if APermissions[i] = lMyCAMPermission then lRationaleMsg := lRationaleMsg + 'This app needs access your CAM to works' + SLineBreak + SLineBreak; end; // // Show an explanation to the user *asynchronously* - don't block this thread waiting for the user's response! // After the user sees the explanation, invoke the post-rationale routine to request the permissions // TDialogService.ShowMessage(lRationaleMsg, procedure(const AResult: TModalResult) begin // TProc is defined in System.SysUtils // APostRationaleProc; // used by System to go-back in before function... end) end; procedure TfrmFormMain.prcPermissionsResulted(Sender: TObject; const APermissions: TArray<string>; const AGrantResults: TArray<TPermissionStatus>); begin // verifying if the permissions was granted! - Here, testing only 1 permission = CAM if (Length(AGrantResults) = 1) and (AGrantResults[0] = TPermissionStatus.Granted) then prcCAMStartCapture { execute your procedure here if all it's ok } else TDialogService.ShowMessage('The permission <<CAMERA access>> not allowed by user'); end; {$ENDIF} procedure TfrmFormMain.prcCAMSampleBufferReady(Sender: TObject; const ATime: TMediaTime); begin // ****** // DONT USE "main thread" to process something "critial" like: process images by Cam // or anyother that can "crash" your UI (user interface) or app!!! // *************************************************************** // If exist images to process, then, put it on a "queue" to execute it! // Here, "prcSampleBufferSync" will be called always in a queue from main thread (your app) // to "dont paralize it" while the images it's processed!!! // // .............."main thread".........."method called" // TThread.Queue(TThread.CurrentThread, prcCAMSampleBufferSync); // end; procedure TfrmFormMain.prcCAMSampleBufferSync; begin // // use your imagination, to redirect this buffer !!! :) // // in the meantime ... let's write the pictures coming from the camera in the TImage lMyCAMDevice.SampleBufferToBitmap(imgVideoCapture.Bitmap, True); // end; procedure TfrmFormMain.prcCAMStartCapture; begin if not(lMyCAMDevice = nil) then begin // to Mobile (Android), change properties from CAMERA, needs permission! {$IF DEFINED(ANDROID)} if PermissionsService.IsPermissionGranted(lMyCAMPermission) then {$ENDIF} begin try lMyCAMDevice.StopCapture; // to avoid any error below // lMyCAMDevice.Quality := TVideoCaptureQuality.PhotoQuality; // lMyCAMDevice.StartCapture; // starting video capture! // prcMyLog('CAM device = Capture stated!'); prcMyLog('CAM ' + fncMyIIF(lMyCAMDevice.IsDefault, 'is', 'is not') + ' Default'); prcMyLog('CAM ' + fncMyIIF(lMyCAMDevice.HasFlash, 'has', 'has not') + ' Flash'); except on E: Exception do prcMyLog('Error Start CAM' + #13#10 + E.Message); end; end {$IF DEFINED(ANDROID)} else TDialogService.ShowMessage('Then CAM device needs your permission to access it!'); {$ENDIF} end else TDialogService.ShowMessage('None CAM device defined!'); end; procedure TfrmFormMain.sbtnCAMStopCameraClick(Sender: TObject); begin if not(lMyCAMDevice = nil) then begin // Needs "permissions" to read or change CAM properties! // {$IF DEFINED(ANDROID)} if PermissionsService.IsPermissionGranted(lMyCAMPermission) then {$ENDIF} begin if (lMyCAMDevice.State = TCaptureDeviceState.Capturing) then lMyCAMDevice.StopCapture else lMyCAMDevice.StartCapture; end {$IF DEFINED(ANDROID)} else TDialogService.ShowMessage('The <<CAMERA access>> permission is necessary'); {$ENDIF} end; end; procedure TfrmFormMain.sbtnCAMStartCameraClick(Sender: TObject); begin {$IF DEFINED(ANDROID)} PermissionsService.RequestPermissions( { } [lMyCAMPermission], { } prcPermissionsResulted, { } prcDisplayRationale { = nil, if you DONT WANT show any message! } ); {$ELSE} prcCAMStartCapture; // MSWindows or macOS {$ENDIF} end; initialization lMyCAMDevice := nil; {$IF DEFINED(ANDROID)} lMyCAMPermission := JStringToString(TJManifest_permission.JavaClass.CAMERA); {$ENDIF} finalization end. hug
  10. with FMX.Media.TCameraComponent if using iOS you can choice between: Frontal or Back CAM, using "Kind" property! BUT, it is said: "deprecated" on RAD warning!!! then,use "TCameraKind.<< kind here >> see more on HELP SYSTEM! other way, you can try adapt my code using some like this: var lVideoCaptureDevice: TVideoCaptureDevice; lCaptureDevice : TCaptureDevice; i : integer; begin lVideoCaptureDevice := nil; // for i := 0 to (TCaptureDeviceManager.Current.Count - 1) do begin lCaptureDevice := TCaptureDeviceManager.Current.Devices[i]; // if (lCaptureDevice.MediaType = TMediaType.Video) and (lCaptureDevice is TVideoCaptureDevice) then begin if TVideoCaptureDevice(lCaptureDevice).Position = TDevicePosition.Front then lVideoCaptureDevice := TVideoCaptureDevice(lCaptureDevice); break; // jump out looping... end; end; // if not(lVideoCaptureDevice=nil) then ShowMessage('Hello Frontal CAM...'); end; NOTE: I dont have tested ok, now is with you! hug
  11. emailx45

    win32metadata

    Edit post ---> passed some time later it's not possible re-edit it! re-edited....
  12. emailx45

    Problem with clearing ADO Tables

    for sure!
  13. emailx45

    Problem with clearing ADO Tables

    As this is a Database being accessed via "ODBC", we will have the lowest class "EOleException", thanks Microsoft for your OLE objects and properties (Variants by the way)! hug
  14. emailx45

    Problem with clearing ADO Tables

    Ring's Lord from the "differences": In Database system, whatever the type, it will translate what, in fact, will generate an "Access Violation" (since the "data" (not the records of tables in the Database), but what is in current memory, does not correspond to a valid or existing "data" ! The "Reference Integrity" will cause an "Access Violation" referring to the "data" that points to the data in the file. So, if the reference no longer points to a valid value, obviously, that we are "violating" the rules, therefore, it will not be possible to have "access" to the given "data", whatever it may be, a variable, a record in a data table, etc ... Anyway, it is an "Access Violation" in its fundamental point of being. Now the technical name for a given area can be any other that is relevant and pertinent to the area in question. And so, the Elder said: forgive me Lord, he doesn't know the quiz!
  15. emailx45

    Problem with clearing ADO Tables

    the table can be (yes) "opened"!!! if exist some dependeces, the "AV" will be showed...
  16. emailx45

    Problem with clearing ADO Tables

    try my sample: Working as expected unit uFormMain; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Data.DB, Data.Win.ADODB, Vcl.Grids, Vcl.DBGrids; type TForm1 = class(TForm) Memo1: TMemo; btnOpenConnection: TButton; ADOConnection1: TADOConnection; btnChangeDBPath: TButton; ADOCommand1: TADOCommand; btnGetAllTablesOnDB: TButton; ListBox1: TListBox; btnPlease_EmptyThisTable_Selected: TButton; DBGrid1: TDBGrid; ADOQuery1: TADOQuery; DataSource1: TDataSource; btnOpenTableSelected: TButton; procedure btnOpenConnectionClick(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure btnChangeDBPathClick(Sender: TObject); procedure FormCreate(Sender: TObject); procedure btnGetAllTablesOnDBClick(Sender: TObject); procedure btnPlease_EmptyThisTable_SelectedClick(Sender: TObject); procedure btnOpenTableSelectedClick(Sender: TObject); private procedure prcDBinfo; public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} var lADOConnText: string = { } 'Provider=Microsoft.Jet.OLEDB.4.0;' + { } 'Data Source=D:\RADRIOTests\VCL_MDB_Database_Access_Test_Connection\Data\dbdemos.mdb;' + { } 'Mode=ReadWrite|Share Deny None;' + { } 'Persist Security Info=False;'; // lMyNewPathMDBfile: string = 'D:\RADRIOTests\VCL_MDB_Database_Access_Test_Connection\Data\dbdemos.mdb'; function fncMyIIF(lCondition: boolean): string; begin result := 'false'; // if lCondition then result := 'true'; end; procedure TForm1.btnChangeDBPathClick(Sender: TObject); var i: integer; begin if (ADOConnection1.Connected) then ADOConnection1.Close; // for i := 0 to (ADOConnection1.Properties.Count - 1) do begin if ADOConnection1.Properties.Item[i].Name = 'Data Source' then ADOConnection1.Properties.Item[i].Value := lMyNewPathMDBfile; // <--- changing DB path!!! // Memo1.Lines.Add( { } Format('%s=%s', [ { } ADOConnection1.Properties.Item[i].Name, { } ADOConnection1.Properties.Item[i].Value { } ]) { } ); end; // try ADOConnection1.Open(); // prcDBinfo; except on E: Exception do ShowMessage('my error:' + sLineBreak + E.Message); end; end; procedure TForm1.btnGetAllTablesOnDBClick(Sender: TObject); begin if ADOConnection1.Connected then begin ADOConnection1.GetTableNames(ListBox1.Items, false); end else ShowMessage('DB not connected!'); end; procedure TForm1.btnOpenConnectionClick(Sender: TObject); begin Memo1.Lines.Add(lADOConnText); // try if not(ADOConnection1.Connected) then ADOConnection1.Open(); // prcDBinfo; except on E: Exception do ShowMessage('my error:' + sLineBreak + E.Message); end; end; procedure TForm1.btnOpenTableSelectedClick(Sender: TObject); begin try if not ADOConnection1.Connected then ADOConnection1.Open(); except on E: Exception do begin ShowMessage('my error:' + sLineBreak + E.Message); exit; end; end; // if (ListBox1.ItemIndex > -1) then begin ADOQuery1.SQL.Text := Format('select * from %s', [ListBox1.Items[ListBox1.ItemIndex]]); ADOQuery1.Open; end; end; procedure TForm1.btnPlease_EmptyThisTable_SelectedClick(Sender: TObject); var i: integer; begin { BeginTrans returns a value of type integer, indicating the nesting level of the new transaction. A successful execution of BeginTrans triggers an OnBeginTransComplete event and sets the InTransaction property to true The ADO connection object must have an active connection before BeginTrans can be used } try if not ADOConnection1.Connected then ADOConnection1.Open(); except on E: Exception do begin ShowMessage('my error:' + sLineBreak + E.Message); exit; end; end; // try if (ListBox1.ItemIndex > -1) then begin try ADOCommand1.CommandText := Format('delete * from %s', [ListBox1.Items[ListBox1.ItemIndex]]); // if not ADOConnection1.InTransaction then ADOConnection1.BeginTrans; // see return value // ADOCommand1.Execute; // see return value // ADOConnection1.CommitTrans; // btnOpenTableSelected.Click; // refreshing DBGrid... except on E: Exception do ShowMessage('my error:' + sLineBreak + E.Message); end; end else ShowMessage('Stop: Table not selected...'); finally if ADOConnection1.InTransaction then ADOConnection1.RollbackTrans; // AV is db not conneted end; end; procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction); begin ADOConnection1.Close; end; procedure TForm1.FormCreate(Sender: TObject); begin if (ADOConnection1.Connected) then ADOConnection1.Close; // ADOConnection1.ConnectionString := lADOConnText; end; procedure TForm1.prcDBinfo; var i: integer; begin Memo1.Lines.Add('DB default: ' + ADOConnection1.DefaultDatabase); Memo1.Lines.Add('Version: ' + ADOConnection1.Version); Memo1.Lines.Add('Provider: ' + ADOConnection1.Provider); Memo1.Lines.Add('Dataset couting: ' + ADOConnection1.DataSetCount.ToString); Memo1.Lines.Add('In Transaction: ' + fncMyIIF(ADOConnection1.InTransaction)); // Memo1.Lines.Add('----'); // for i := 0 to (ADOConnection1.Properties.Count - 1) do begin Memo1.Lines.Add( { } Format('%s=%s', [ { } ADOConnection1.Properties.Item[i].Name, { } ADOConnection1.Properties.Item[i].Value { } ]) { } ); end; end; end. hug (prime minister's Boss ) :)))))
  17. You have 1 problem, I think that we have many others with you: what is your IDE what VirtualTree edition some like this, u see? as all component, for understand (at least), you need look the sources (if you have it)!
  18. emailx45

    Problem with clearing ADO Tables

    my tip about "Connection string" always that possible, test new "string" with value desired in desing-time, then, you'll have more certains about others ways, you see? this works for any other case, include others "target db"
  19. emailx45

    Footman

    hier bevestigen we over codering! zie de eenheid "Consts" - praktisch een herhaling
  20. emailx45

    Footman

  21. emailx45

    Footman

  22. emailx45

    Footman

    Creëren van "constanten", aangepaste klassen voor onder andere uitzonderingen, om het gebruik later te vergemakkelijken ... Allemaal echt niet nodig. Een teveel aan code, waarvan er vele al bestaan in Delphi zelf ... zoals in veel andere onderdelen van het project.
  23. if dont exist "free or payed", then create it: https://fontforge.org/en-US/ DejaVu Sans Mono Thai https://en.m.fontke.com/font/10351322/ License type: Free The way of authorization is for reference only. Please contact the copyright party to purchase commercial authorization. BUT DONT APPEARS ON DELPHI EDITOR!!!
×