- Krishna Mohan Gullap
- PowerBuilder
- Tuesday, 2 July 2024 01:51 PM UTC
Hello there to all PB Guru's
So, in my application, I have an NVO (say nvuo_dw) of type DataStore with the below variables:
2 strings and 1 string array
In my window code, I create an array of type nvuo_dw and dynamically populate it, depending on the number of DataWindows in my window (which I obtain using the Control[] built-in array in Window Code)
nvuo_dw lnvuo_dw_list[]
I am trying to create the instance of the first member of this array using the following command
lnvuo_dw_list[1] = Create DataStore // Doesn't work
So, I tried creating a Dummy DataStore and assign it to the first element of the array
DataStore lds_temp
lds_temp = Create DataStore
lnvuo_dw_list[1] = lds_temp //This one fails during runtime throwing the error 'Cannot assign object of type datastore to variable of type nvuo_dw
// (even though nvuo_dw is an NVO of type DataStore
I tried creating a dynamic DS and assigning it to this too, but nothing has worked so far
Then, I tried creating it using the SyntaxFromSQL method as well, that didn't work either
ls_new_syntax = SQLCA.SyntaxFromSQL(ldw_sample.GetSQLSelect() , 'Style(Type=Form)', ls_err)
lnvuo_dw_list [1].Create(ls_new_syntax, ls_err) //This one fails with the same runtime error
Basically, I am stuck :-) Any help is greatly appreciated!
Regards,
Krish
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.