直接写在函数里
'view页面显示函数。返回一个数组
'参数类别(文章id,栏目id,用户名,级别。)
Public Function View(ByVal mainunid As String, ByVal Lmid As String, ByVal who As String, ByVal jibie As String) As Variant
On Error GoTo ErrorString
If my_context Is Nothing Then
v_my_context_return = 0
Exit Function
End If
Dim my_conn As New ADODB.Connection
Dim my_comm As New ADODB.Command
Dim rs As New ADODB.Recordset
Dim StatTime1 As Date
Dim mainlmid As String
StatTime1 = CDate(Year(Now()) & "-" & Month(Now()) & "-" & Day(Now())) '现在时间
mainlmid = CStr(Left(mainunid, 2)) & "0000000000" '主栏目id
With my_conn '连接对象属性
.Open vConnectionString
.CursorLocation = adUseClient
If vDefaultDatabase <> "" Then
.DefaultDatabase = vDefaultDatabase '使用DefaultDatabase属性的地方
End If
End With