- changed status to invalid
How Can I add IDENTITY increment
Issue #354
closed
here is my class configration , i am using mssql server (delphi/unidac)
I can't see IDENTITY (1,1) in table
how can i do it
[Entity]
[Table('TestTablo', 'dbo')]
TTestTablo = class(TObject)
private
fId: Integer;
Fkodu: string;
FADI: string;
FSOYADI: string;
public
public
[Column('ID', [cpPrimaryKey, cpRequired, cpNotNull, cpDontInsert,
cpUnique])][AutoGenerated]property Id: Integer read fId write fId;
[Column]property Kodu: string read Fkodu write Fkodu;
[Column]property ADI: string read FADI write FADI;
[Column]property SOYADI: string read FSOYADI write FSOYADI;
end;
The table I want to create
CREATE TABLE [dbo].[TestTablo](
[ID] [int] IDENTITY(1,1) NOT NULL,
[Kodu] [nvarchar](50) NULL,
[ADI] [nvarchar](50) NULL,
[SOYADI] [nvarchar](50) NULL,
CONSTRAINT [PK__TestTabl__3214EC2771AE34EA] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
Thanks
Comments (3)
-
repo owner -
reporter Yes, you are right Thank you for your help I wish there were some more database samples especially ManyToOne, OneToMany
-
reporter - changed status to closed
I have the problem FUniDACConnectionAdapter.QueryLanguage: = qlMSSQL;
- Log in to comment
Please posts questions on https://groups.google.com/forum/#!forum/spring4d
I suspect you did not set the proper QueryLanguage on your IDBConnection - set that to qlMSSQL to get the proper generator for creating the table.