Help! How do you link differents datawindow objects to a datawindow control during runtime?

I am developing a system in which I need to link a Datawindow control
with
differents Datawindow objects in runtime.Therefore, I set the Datawindow

control property DATAOBJECT with the value of the datawindow object I
want
(dw_1.dataobject = "dw_object1"), and then I change it with other values

during execution, doing dw_1.dataobject = "dw_object2" in the script
(of course then I do dw_1.settransobject(transaction_object)...).
When I run the system into PowerBuilder's environment (with the Run
painter),
THE SYSTEM WORKS. I made the executable without problem (no errors), BUT

(and this is my problem) when I run it, an error occurs: the error is:
"Application terminated.Null object reference at line..."
I don't know why the application object runs OK with the Run Painter
(the changes of datawindows objects during execution work),
but in  the executable don't (I have the dll's runtime, and there is no
conectivity problem).
I'm looking forward for your help. (Maybe I can't set different
dataobjects to a datawindow control simply changing the string of
it dataobject property, but I don't know what more I have to do, and,
if I have to do something more, Why does the application object work
when I
run it from the Run Painter?).
In the Company we have PowerBuilder Enterprise 5.0.
I've worked with PowerBuilder for two years.
Thank you very much.
My address is [email protected]



0
Rovedo
12/16/1997 7:42:19 PM
📁 sybase.powerbuilder.general
📃 62418 articles.
⭐ 19 followers.

💬 2 Replies
👁️‍🗨️ 933 Views

    Make certain that the datawindow objects exist in your compiled PBDs or
DLLs.  If they are not part of the library list, you'll need to include
references to them in the application's resource (PBR) file, so that they'll
be included with the executable.

Hth,
--
Anthony M. Perugini
Principal Consultant
CPDP, CPI, CSPdba, MCPS
Pinnacle Decision Systems Inc.  www.pinndec.com
[email protected]

Rovedo Pablo wrote in message <[email protected]>...
>I am developing a system in which I need to link a Datawindow control
>with
>differents Datawindow objects in runtime.Therefore, I set the Datawindow
>
>control property DATAOBJECT with the value of the datawindow object I
>want
>(dw_1.dataobject = "dw_object1"), and then I change it with other values
>
>during execution, doing dw_1.dataobject = "dw_object2" in the script
>(of course then I do dw_1.settransobject(transaction_object)...).
>When I run the system into PowerBuilder's environment (with the Run
>painter),
>THE SYSTEM WORKS. I made the executable without problem (no errors), BUT
>
>(and this is my problem) when I run it, an error occurs: the error is:
>"Application terminated.Null object reference at line..."
>I don't know why the application object runs OK with the Run Painter
>(the changes of datawindows objects during execution work),
>but in  the executable don't (I have the dll's runtime, and there is no
>conectivity problem).
>I'm looking forward for your help. (Maybe I can't set different
>dataobjects to a datawindow control simply changing the string of
>it dataobject property, but I don't know what more I have to do, and,
>if I have to do something more, Why does the application object work
>when I
>run it from the Run Painter?).
>In the Company we have PowerBuilder Enterprise 5.0.
>I've worked with PowerBuilder for two years.
>Thank you very much.
>My address is [email protected]
>
>
>


begin 666 Anthony M Perugini.vcf
M0D5'24XZ5D-!4D0-"DXZ4&5R=6=I;FD[06YT:&]N>3M-#0I&3CI!;G1H;VYY
M([email protected]&5R=6=I;FD-"D]21SI0:6YN86-L92!$96-I7-T96US($EN
M8RX-"E1)5$Q%.E!R:6YC:7!A;"!#;VYS=6QT86YT#0I.3U1%.D-01% L($-0
[email protected]&)A+"!-0U!3#0I414P[5T]22SM63TE#[email protected],"TR,SDM,C$R
M, T*5$5,.U=/4DL[1D%8.C(P,RTR,SDM-C0U,PT*0412.U=/4DLZ.SLY-R!7
M87-H:6YG=&]N($%V92X[3F]R=&@@2&%V96X[0U0[,#8T-S,[55-!#0I,04)%
M3#M73U)+.T5.0T]$24Y'/5%53U1%1"U04DE.5$%"3$4Z.3<@5V%S:&EN9W1O
M;B!!=F4N/3!$/3!!3F]R=&@@2&%V96XL($-4(# V-#
    
0
Anthony
12/16/1997 6:49:02 PM
> (and this is my problem) when I run it, an error occurs: the error is:
> "Application terminated.Null object reference at line..."

Do you reference some column that is into the DataObject? I had a problem
like yours and I solved that using GetItem()/SetItem() functions.

Vinicius Assef
Vitoria(ES), Brazil
e-mail: [email protected]

0
Vinicius
12/18/1997 2:00:53 AM