CodePudding user response:
With webservice directly as a data sourceCodePudding user response:
Any returned Dataset xm element data, could you tell me how you can have a faster way to read in the Datawindow?????CodePudding user response:
Above pb11 version already can use the webservice data to build the data window, this method is the fastestCodePudding user response:
Eldest brother, really never used!!!!!CodePudding user response:
Pb11 + webservice distributed three-tier application
A, WEBSERVICE server-side development
1, to establish a new workspace workspace
Select the FILE menu under NEW, create a NEW workspace,
Click on the below after
In the name of the file input workspace name, assume our workspaces called webserver, click the save button, so the workspace is built successfully,
2, the establishment of a.net web service application
Click on the FILE menu of the NEW
Select the.net web service click the ok button
Click the next button
Click the next button
Here we do not change the PBL library name, of course you can change the library name according to what you mean, click the next button,
Point the next button until a
Need to pay attention to some here, if your current IIS port, is not the default of 80, so behind the localhost to add
": 81", if your port number is 81,
Another click next until the finish button,
3, connect to the database
Let's establish a database connection thought later webservice service provides a connection,
Open the system generated n_webservice like
Written inside the
//Profile EAS Demo DB V110
The SQLCA. DBMS="ODBC"
The SQLCA. The AutoCommit=False
The SQLCA. DBParm="ConnectString='DSN=EAS Demo DB V110; UID=dba; The PWD=SQL '"
I was copying, installing PB11 the default installation of ASA database, here you can modify as your database connection parameters,
Again after the completion of the database established, we build a ue_retrieve method used to extract the database data
Gen 1 in N_webservice to like to create a named DS1 data storage datastore
2, write in the DS1 dberror
Ls_err_a=sqlerrtext////////
Note: ls_err_a is defined as an instance variable, if you can't see clearly out parameter definition can be great pictures the other store you can see,
////////////////////////////////////////////////////////////////////////////
//used to take a single blob data window value//
////
//the window retrieval of data to a blob and the blob to return to the client//
////
//guoac//
////
//into ls_syntax refs - pass in a string of data window to like syntax used for reconstruction for the window//
//into the ginseng ls_sql string into a condition, for attaching the where condition////
//out of a store data in the participation dwo_blob window of like blob//
////
////dwo_blob returned parameter
////////////////////////////////////////////////////////////////////////////
Long ll_row, ll_returnrow
String ls_returnmodiy
String ls_oldsql ls_newsql, ls_error
String csa
Int I, LI_WHERE
The connect.
If the SQLCA. SQLCode & lt;> 0 then
As_returnerr="database connection error, please check the database connection parameters," + string (sqlca. Sqlerrtext)
Return 1////create the data window error
End the if
If ds1. Create (as_syntax ls_error) & lt;> 1 then
Disconnect the using the sqlca;
As_returnerr="the service side reconstruction error data window! "+ ls_error
Return 1////create the data window error
End the if
Int li_a
Li_a=ds1. Settransobject (sqlca)
If li_a & lt;> 1 then
Disconnect the using the sqlca;
As_returnerr="transaction data storage server setup error!"
///return - 1 set of like things to go wrong
End the if
Ls_oldsql=ds1. Getsqlselect ()
If the trim (ls_oldsql)='or isnull (trim (ls_oldsql)) then
Disconnect the using the sqlca;
As_returnerr="for the incoming data window like SQL syntax is empty!"
//return - 1 in a new window syntax error
End the if
LI_WHERE=pos (UPPER (ls_oldsql), 'WHERE', 1)
IF LI_WHERE=0 THEN
Ls_oldsql=ls_oldsql + "WHERE 1=1"
END the IF
Ls_newsql=ls_oldsql + "+ as_sql
If the trim (ls_newsql)='or isnull (trim (ls_newsql)) then
Disconnect the using the sqlca;
As_returnerr="link after the SQL syntax is empty! Please check the incoming data window to like SQL syntax, "
//return - 1 in a new window syntax error
End the if
If the Match (ls_newsql, '"') then
Disconnect the using the sqlca;
As_returnerr="after the restructuring of SQL syntax errors, grammar cannot contain double quotation marks data window!" + ls_newsql
//return - 1 set new window syntax error
Elseif not Match (upper (ls_newsql), "WHERE") then
Disconnect the using the sqlca;
As_returnerr="after the restructuring of SQL syntax errors, the data window must contain a" where clause for + ls_newsql
//return - 1 set new window syntax error
End the if
If ds1. Modify (' DataWindow. Table. Select="' + ls_newsql + '"') & lt;>" nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull