General information
Title:
Bug in wizard txtbtn
I am trying to use the wizard buttons for my application but find that there is a bug. Can anyone tell me how I can overcome this bug.
When I am using one to many form, the grid won't work. It seems that if the master and detail tables are linked by a key of type other than character, it won't work. In my case, I am using a surrogated key of integer type. I am using the data environment.
The codes that cause the problem are as follow:
* Add child record
IF INLIST(oAddRec.AddOption,OPT_ADD_CHILD,OPT_ADD_BOTH)
* Need to check
GO m.nSaveRec
IF EMPTY(m.cChildKey) OR TYPE("m.cChildKey")#TYPE('oAddRec.KeyValue')
APPEND BLANK IN (m.cChildAlias)
ELSE
INSERT INTO (m.cChildAlias) ((m.cChildKey)) VALUES(oAddRec.KeyValue)
ENDIF
GO m.nSaveRec2
ENDIF
The statement TYPE("m.cChildKey")#TYPE('oAddRecKeyValue') is always .T. because TYPE("m.cChildKey") is always Character type. cChildKey is assigned with my key with type Integer. How do I make the code looks at my key type instead of the property type.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only