The example of stored procedure VB calling stored procedure preface
(Note: The following code is excerpted from Microsoft MSDN and tested.) )
There are many methods to call stored procedures in VB, such as using ADO object's Recordset.Open method, ADO object's Connection.excute method, etc., can obtain recordset information. This topic discusses using the Parameter object to invoke a stored procedure, and you can get a lot of unexpected information.
First, you need to establish a stored procedure in SQL Server. Make sure that any version of SQL Server 2000 is installed and contains the pubs database.
Open Query Analyzer, start your local SQL Server, and then copy the following SQL statement into the query edit box that you opened. Press the "F5" key. OK, the stored procedure Adotestrpe is generated.
When you are finished running, if there are no errors, close Query Analyzer, and then continue with the following actions. Otherwise it may be that your SQL Server 2000 does not have the correct or copy-installed problem.
Open VB6.0, create a new project, default to a form Form1 (if not, add a new form, named Form1), add a CommandButton to the form. Save the project.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.