FireDAC.Comp.Client.TFDCustomConnection.GetLastAutoGenValue
| [–] Properties | |
|---|---|
| Type: function | |
| Visibility: public | |
| Source: FireDAC.Comp.Client.pas FireDAC.Comp.Client.hpp
| |
| Unit: FireDAC.Comp.Client | |
| Parent: TFDCustomConnection | |
Delphi
function GetLastAutoGenValue(const AName: String): Variant;
C++
System::Variant __fastcall GetLastAutoGenValue(const System::UnicodeString AName);
Description
Returns the last autogenerated value.
The GetLastAutoGenValue method returns the last autogenerated value. The meaning and result depend on the DBMS, as described in the following table.
|
DBMS |
Description |
|---|---|
|
Oracle |
|
|
InterBase / Firebird |
|
|
MS SQL Server, MySQL etc |
The last autogenerated value in the session. |
Example
ShowMessage(VarToStr(ADConnection1.GetLastAutoGenValue('MyGen')));