Hi
I've inherited a legacy database which requires some changes... it has no FK relationships as db constraints, hence I was going to set them up the the LLBLGen designer. The problem is that LLBLGen is not giving me the option to match some columns for some datatypes which to me seem the same.
e.g. here are 2 of the table definitions. The TRAFFLOGS.TRAFFLOG_SCREENING_ID should be able to map to SCREENINGS.SCREENING_ID since they have the same datatypes, however when I try to do this within the designer, no columns appear.
CREATE TABLE dbo.TRAFFLOGS (
TRAFFLOG_ID numeric(6,0) IDENTITY NOT NULL,
TRAFFLOG_RESOURCE_ID numeric(6,0) NOT NULL,
TRAFFLOG_SCREENING_ID numeric(6,0) NOT NULL,
TRAFFLOG_NUM tinyint NOT NULL,
TRAFFLOG_PNOTE_USER numeric(6,0) NULL,
TRAFFLOG_PNOTE_TEXT varchar(255) NULL,
TRAFFLOG_TNOTE_USER numeric(6,0) NULL,
TRAFFLOG_TNOTE_TEXT varchar(255) NULL,
TRAFFLOG_PLAY_USER numeric(6,0) NULL,
TRAFFLOG_PLAY_VALUE tinyint NULL,
TRAFFLOG_ACTIVE tinyint NOT NULL,
CONSTRAINT TRAFFLOGS_PK PRIMARY KEY(TRAFFLOG_ID)
)
CREATE TABLE dbo.SCREENINGS (
SCREENING_ID numeric(6,0) IDENTITY NOT NULL,
SCREENING_DATE datetime NOT NULL,
SCREENING_PARENT_ID numeric(6,0) NOT NULL,
SCREENING_TYPE_ID tinyint NOT NULL,
SCREENING_SALES_VALUE decimal(8,2) NULL,
SCREENING_SALES_MARGIN numeric(3,1) NULL,
SCREENING_PNOTE_USER numeric(6,0) NULL,
SCREENING_PNOTE_TEXT varchar(255) NULL,
SCREENING_TNOTE_USER numeric(6,0) NULL,
SCREENING_TNOTE_TEXT varchar(255) NULL,
SCREENING_PLAY_USER numeric(6,0) NULL,
SCREENING_PLAY_VALUE tinyint NULL,
SCREENING_ACTIVE tinyint NOT NULL,
SCREENING_COMMENT varchar(30) NULL,
SCREENING_NOTIFICATION varchar(10) NULL
)
Other columns types are working fine and I haven't seen this issue before, although typically the numeric datatype in other db has had a precision of at least 9. In this example both are showing as DBType=numeric, Length=6, Precision=6, Scale=0 within the LLBLGen Mapped Entity fields area though - so I'm not sure why it is thinking they are not the same datatype?
My system is LLBLGen 2.6 Final / VS 2010 / Sybase ASE 15.x DB
Plse let me know if you need anymore info.
Regards,
James