1. Publish the WebService. The service content is to query the user name through the mobile phone number. 2. Write the stored procedure. (20) (200) (5000) sp_OACreate, @ objout, @ url, falsesp_OAGetProperty, @ responseoutsp_OADestroy @ objend Description: sp_OACreate creates an OLE object instance. First Parameter
1. Publish the WebService. The service content is to query the user name through the mobile phone number. 2. Write the stored procedure. (20) (200) (5000) sp_OACreate, @ obj out, @ url, false sp_OAGetProperty, @ response out sp_OADestroy @ obj end Description: sp_OACreate creates an OLE object instance. First Parameter
1. Publish the WebService and Hong Kong server. The service content is to query the user name through the mobile phone number.
2. Write a stored procedure
. (20) (200) (5000) sp_OACreate, @ obj out, @ url, falsesp_OAGetProperty, @ response outsp_OADestroy @ objend
Note:
Sp_OACreate: Create an OLE object instance.
The first parameter is the program identifier (ProgID) or Class Identifier (CLSID) of the OLE object ).
The second parameter is the returned object token, which must be a local variable of the int type and must be used in subsequent methods. OUTPUT parameter, Vm, must be added with OUT or OUTPUT.
Sp_OAMethod: Call the OLE object method.
Sp_OAGetErrorInfo gets OLE automation error information.
Sp_OADestroy releases the created OLE object.
The first parameter is the object token.
In addition, on the Hong Kong virtual host, sp_OAGetProperty gets the attribute value of the OLE object. sp_OASetProperty sets the attribute of the OLE object as a new value. sp_OAStop stops the OLE Automatic stored procedure execution environment within the server. These are relatively simple.
Iii. Execution of Stored Procedures
.
The result is as follows:
Wu Yanhua
4. Possible Errors
1. Question 1
Solution:
You can use the sp_configure system stored procedure to view and change the current value of the Ole Automation Procedures option.
View the current settings of OLE Automation Procedures.
; GO
Enable OLE Automation Procedures.
Sp_configure, 1; GORECONFIGURE; GOsp_configure, 1; GORECONFIGURE; GO
2. Question 2
Solution:
In the webservice Add under Node