Questions tagged as 'delphi'

1
answer

How to validate DBGrid fields before saving?

I have DBGrid , but I want it to validate the fields before saving to the database. I think I have to use the BeforePost event, but I have no idea how to do it. Could someone give me a tip?     
asked by 16.03.2015 / 04:44
1
answer

Delphi hours operation

I was handling hours in Delphi and came across the following situation: CASE 1 horafinal := strtotime('08:00'); horaInicial := strtotime('17:00'); horaInicial := horaInicial - horafinal; //09:00 horafinal := horafinal - horafinal; //00:00...
asked by 06.03.2015 / 20:58
1
answer

DBEdit apparently not linked to TADOQuery

I have ADOConnection , a ADODataSet , DataSource , ADOQuery , a DBGrid and a DBEdit . The DBEdit is with the DataField = numero property. A button with the test: AdoQuery1.close; AdoQuery1....
asked by 21.04.2014 / 02:08
2
answers

Is there a way to disable Delphi's "Debugger Exception Notification"?

I would like to disable the function from which the debugger notifies me of an Exception in a code snippet. Example: try Text := CurrToStrF('Erro', ffNumber, 2); except Text := '0,00'; end; While debugging the above code on some oc...
asked by 14.02.2014 / 20:04
2
answers

Execute executable-independent program

I'm doing an updater, but at certain times, I need to update the executable, which is not possible since it's in use. I would have a way to swap the executables and run the program later.     
asked by 18.10.2014 / 11:27
1
answer

Why does FloatToStr exist if Delphi does not have the Float data type?

Reading about the Delphi / Pascal data types, I realized that there is no type Float , however, there is the FloatToStr() function, as well as StrToFloat() . In this case, could you use a floating-point variable of any kind...
asked by 31.07.2018 / 22:45
2
answers

Error opening form - Delphi

I have an application that was developed in Delphi7 and I need to make a change in a certain form, but when trying to open this form to make these changes the following error window appears: Because it is an old application (which I did...
asked by 19.09.2017 / 15:22
1
answer

'Could not convert variant of type (Null) into type (Double)'

if DataModuleGeral.tbHonorariosPERCENT_ADV_ASSIST1.AsFloat = 0 then begin DataModuleGeral.tbHonorariosPERCENT_ADV_ASSIST1.Value := Null; end; I have the above routine that when the percentage caligo is 0 I try to set the field to Null...
asked by 15.08.2017 / 14:40
1
answer

Generate number using identity

Is it possible to generate a number before writing the record to the database? Use field identity of SQL Server 2014. Work with Delphi Berlin.     
asked by 23.08.2017 / 16:19
1
answer

Separate Letters from a String and Add in a ComboBox

Searching the web I found this function to return the letters of the HDDs. function tbDriveLetters: string; { Uso: S := tbDriveLetters; - retorna 'ACD' se existir as unidades A:, C: e D: } var Drives: LongWord; I: byte; begin Result := '...
asked by 29.05.2017 / 22:59