Skip to Content
avatar image
Former Member

PostURL from PowerBuilder 9 to 12.6

We have an ASP service from an external provider of our application running in PowerBuilder 9, we invoke this service as well:

inet linet_main

n_cst_internet luo_data

...

ls_url=http://10.0.0.21/samweb.asp?

lblb_args=blob("banco=0045∏ucto=20&token=Cod_Oper=090|Banco=0045|Sucursal=0500|Fecha_neg=20151124|UsuarioBD=IJQQQQQQQQQQQQQQQQQQ|PwdBD=IJQQQQQQQQQQQQQQQQQQ|Cod_Barras=017694667802006051800000035109|Adicional=")

ls_headers= "Content-Type:application/x-www-form-urlencoded~n Content-Length: " + String( ll_length ) + "~n~n"

...

ll_ret = linet_main.PostURL(ls_url,lblb_args,ls_headers,ll_puerto,luo_data)

We migrated the application to PowerBuilder 12.6, and now returns: -6 Internet request failed


What could be the problem?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Oct 20, 2016 at 06:50 PM

    My guess is that it has to do with PB 12.6 being Unicode and PB 9 being Ansi.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 21, 2016 at 06:15 AM

    Yes, encoding may be the reason.

    The Blob() function has an optional second parameter to specify the encoding. Default is EncodingUTF16LE!. It may be your ASP service may not handle the encoding or the specified Content-Length (ll_length) is not correct because of the different encoding.

    Try Blob ("...", EncodingAnsi!)

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 21, 2016 at 03:47 PM

    Roland and René, thanks for your help , this worked. Andrés

    Add comment
    10|10000 characters needed characters exceeded