Sample code for 30+ languages & platforms
PowerBuilder

Transition from Zip.AppendSb to Zip.AddSb

Provides instructions for replacing deprecated AppendSb method calls with AddSb.

Chilkat PowerBuilder Downloads

PowerBuilder
integer li_rc
integer li_Success
oleobject loo_Zip
string ls_PathInZip
oleobject loo_Sb
string ls_Charset

li_Success = 0

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

// ...
// ...
ls_PathInZip = "example.txt"
loo_Sb = create oleobject
li_rc = loo_Sb.ConnectToNewObject("Chilkat.StringBuilder")

loo_Sb.Append("This is a test")
ls_Charset = "utf-8"

// ------------------------------------------------------------------------
// The AppendSb method is deprecated:

li_Success = loo_Zip.AppendSb(ls_PathInZip,loo_Sb,ls_Charset)

// ------------------------------------------------------------------------
// For consistency, the name has changed to AddSb.

li_Success = loo_Zip.AddSb(ls_PathInZip,loo_Sb,ls_Charset)


destroy loo_Zip
destroy loo_Sb