Sample code for 30+ languages & platforms
PowerBuilder

Replace Deprecated GetExpirationDt

Shows how to replace the deprecated GetExpirationDt method.

Chilkat PowerBuilder Downloads

PowerBuilder
integer li_rc
oleobject loo_Cache
string ls_Cache_item_key
oleobject loo_Dt1
oleobject loo_Dt2

loo_Cache = create oleobject
li_rc = loo_Cache.ConnectToNewObject("Chilkat.Cache")
if li_rc < 0 then
    destroy loo_Cache
    MessageBox("Error","Connecting to COM object failed")
    return
end if

// ....
// ....

ls_Cache_item_key = "xyz"

// Instead of this:
loo_Dt1 = loo_Cache.GetExpirationDt(ls_Cache_item_key)
destroy loo_Dt1

// Do this:
loo_Dt2 = create oleobject
li_rc = loo_Dt2.ConnectToNewObject("Chilkat.CkDateTime")

loo_Dt2.SetFromRfc822(loo_Cache.GetExpirationStr(ls_Cache_item_key))


destroy loo_Cache
destroy loo_Dt2