Home > database >  How to call in the PB URL parameter to it
How to call in the PB URL parameter to it

Time:09-18

I'm developing a software, which you need to call a URL (HTTP://10.1.1.12:8012/aaa.aspx? Cardid=111 & amp; Pname=2222)
Which need to give two parameters to the url in the pb, one is a cardid, one is pname, could you tell me how to implement the

CodePudding user response:

Use PBCOMMANDPARM to pass values,

CodePudding user response:

Use posturl

PB PostURL ()

PostURL ()
HTTP Post function, so the original concept application can through the CGI, NSAPI, ISAPI interface sends a request,
Grammar servicereference becomes unavailable but PostURL (urlname urldata, headers, data)
Parameter
Servicereference becomes unavailable but: Inet object instance or reference
Urlname: String type, designated to send the request URL (uniform resource locator)
Urldata: Blob, sent to the specified urlname parameters specify the URL of the
Headers: String type, specify the HTML first, for Netscape browser, need a newline after each HTTP header (~ n), after all first and then with a newline (~ n)
Data: InternetResult instance variables, used to hold the returned HTML
The return value
Integer, the function returns 1 on success, return the following error values:
1 general error
2 the URL specified is invalid
- 4 cannot be connected to the Internet
- 6 Internet request invalid
Use the
Data parameters of the function requirement is class user object inherited InternetResult object instance, in the definition of the user object, you need to define InternetData cover function (), to deal with the Internet returns HTML data, because of the Internet to asynchronously send data, therefore, the data parameter must be an instance variable or a global variable reference (such as window class instance variables),
Example the following code to invoke PostURL (), among them, the Iinet_base is a type of Inet instance variables; N_ir_msgbox is the class user object inherited InternetResult object, iir_msgbox is the user object is an instance:
Blob lblb_args
String ls_headers
String ls_url
Long ll_length
Ir_msgbox=CREATE n_ir_msgbox
Ls_url="http://coltrane.sybase.com/"
Ls_url +="cgi - bin/pbcgi60. Exe/"
Ls_url +="myapp/n_cst_html/f_test? "
Lblb_args=blob (" ")
Ll_length=Len (lblb_args)
Ls_headers="Content - Length:" + String (ll_length) + "~ n ~ n
"Iinet_base. PostURL (ls_url lblb_args, ls_headers, iir_msgbox)
  • Related