最近有在做一个需求,需要在VB6.0中调用存储过程,整理了一下,供大家参考, 范例: Function callStoredProcedure(sEmployeeID As String, Optional sNotes As String = "") As String On Error GoTo errHand Dim conn As ADODB.Connection Set conn = "driver={SQL Server};server=(local);uid=s…
1.首先展示创建sql server存储过程的语句,创建一个简单的存储过程,测试用. SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[register_info] ), ), ), ), ), @create_time datetime AS BEGIN ); BEGIN TRY BEGIN TRANSACTION; --插入注册信息,这里未做任何验证,直接插入 INSERT into regist…