Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Name not found accessing external object property

620 views
Skip to first unread message

Shari

unread,
May 22, 2008, 11:58:54 AM5/22/08
to
What's interesting is that when I try to put in bad data, it
throws my programmed exceptions (unable to connect to db, no
record of that policy found etc.). If I put in good data, I
get the above. Here is most of my code:


connect USING SQLCA;
if sqlca.sqlcode <> 0 then
e.setmessage("Unable to connect to database on server: " +
sqlca.servername + &
". Msg=" +
string(sqlca.sqldbcode) + " " + sqlca.sqlerrtext)
throw e
end if

if isnull(policyID) then policyID = ""

lds_sp = create datastore
lds_sp.dataobject = 'd_getimage_index'
lds_sp.setTrans(SQLCA)
i=lds_sp.Retrieve (PolicyID)

choose case i
case 0
e.setmessage("Policy: " + policyID + " not found " )
throw e
case is > 1 //should never happen
e.setmessage("Policy" + policyID + " returned more than
one value" )
throw e
case is < 0
e.setmessage("Unable to connect to retrieve policy data "
+ sqlca.servername + &
". Msg=" +
string(sqlca.sqldbcode) + " " + sqlca.sqlerrtext)
throw e
end choose

s_error= lds_sp.Modify("DataWindow.Export.XML.MetaDataType =
XMLNone!")
ls_out= lds_sp.Object.DataWindow.Data.XML

return ls_out


-------end of code

I think that the error is related to accessed the
databwindow though either modify or to get the XML. The
error looks suspiciously like the one you get when you
specify an non-exsistant column or row using the dot
notation in a client server app. I have looked at my
DLLs and assemblys until I am blue in the face. It did seem
to me that the "PowerBuilder Runtime Packager" did not do a
good job of providing the files for my app.

Got any ideas?


Shari

Bruce Armstrong [TeamSybase]

unread,
May 22, 2008, 11:27:16 PM5/22/08
to

Are you responding to an earlier thread? I can't make sense out of
what you're asking. What line is the error occurring on? Is it on:

ls_out= lds_sp.Object.DataWindow.Data.XML

If so, what happens if you remove the modify statement before it? It
doesn't look valid. In fact, I'd be willing to guess that's where the
error is coming from. Enumerated types ( XMLNone! ) are only
supported in the painter, you have to use the numeric value in a
Modify statement.

0 new messages