Hello,
I am trying to use the following MSSQL table with WinDev 12:
-----------------------------------------------------------
create table "pCategory" (
"pCategorySeq" int identity not null,
"pCategoryID" varchar(10) not null,
"pCategoryDescr" varchar(80) not null,
"pCategoryFather" int null) ON 'PRIMARY'
go
alter table "pCategory"
add constraint "pCategory_PK" primary key clustered ("pCategorySeq")
go
/* Add the remaining keys, constraints and indexes for the table "pCategory". */
alter table "pCategory" add constraint "pCategory_ID" unique (
"pCategoryID")
go
alter table "pCategory" add constraint "pCategory_Descr" unique (
"pCategoryDescr")
go
/* Add foreign key constraints to table "pCategory". */
alter table "pCategory"
add constraint "pCategory_pCategory_FK1" foreign key (
"pCategoryFather")
references "pCategory" (
"pCategorySeq") on update no action on delete no action
go
----------------------------------------
When I import the table in Analysis and use RAD/RAD Simple, the pCategoryFather comes as a ComboBox and it is filled from the same table(pCategory) thus doing a
pCategoryFather=pCategorySeq.
If I leave pCategoryFather=Null, everything works as expected.
If I try to give pCategoryFather a value, using the comboBox, WinDev gets confused. It confuses the pCategorySeq (to be added) with the pCategorySeq it retrieves with the comboBox.
In Clarion I would create an Alias to the pCategory file (in the dictionary) and then use this Alias in my ComboBox. So no confuses ....
How would I do it in WinDev12?
Steven Sitas
Message forwarded from pcsoft.us.windev