Search the Community
Showing results for tags 'function'.
Found 2 results
samjoko posted a topic in DatabasesHi, I'll try auto-increment value in mongodb although, basically not support autoincrement field value in mongodb. example) https://www.tutorialspoint.com/mongodb/mongodb_autoincrement_sequence.htm that is working in cli. but, i want do it firedac component. and i can't find any support execute script procedures. can i use that script in firedac? or other way??? or impossible? p.s : sorry for my poor english.
Hi, I have a project where I need to get the value of a year in a field so I use DecodeDate( dtDate, Year, Month, Day); where dtDate is a TDateTime variable, Year, Month, Day are Word variables. When I run the code I get an error - 'Constant or type identifier expected'. I've downloaded the example Embarcadero have for using DecodeDate: procedure TfAccounts.Button1Click(Sender: TObject); var Present: TDateTime; Year, Month, Day: Word; begin Present:= Now; System.SysUtils.DecodeDate(Present, Year, Month, Day); Label1.Caption := 'Today is Day ' + IntToStr(Day) + ' of Month ' + IntToStr(Month) + ' of Year ' + IntToStr(Year); end; .. and get this same error. The 'Word' is red-underlines as the error. I have System.SysUtils in the Uses clause: uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, ... etc I have used this same code in a different project and it works with no error. I can't think of why it isn't working in this particular project. Unless some other unit in the Uses clause is causing a problem, although SysUtils comes almost first. Any thoughts would be welcomed.