?? On Error Resume Next ?? Set GetMdbRs = Nothing ?? If Len(Password) = 0 Then ?????? Set conn = GetMdbConnection( FileName ) ?? Else ?????? Set conn = GetSecuredMdbConnection( FileName,Password ) ?? End If ?? If conn Is Nothing Then Exit Function
?? Set rs = Server.CreateObject("ADODB.Recordset") ?? If Err.Number <> 0 Then Exit Function
?? rs.Open source,2 ?? If Err.Number <> 0 Then Exit Function ?? Set GetMdbRs = rs End Function
'--------------------------------------------------- Function GetOtherRs( DataType,Path,Cursor ) ?? Dim conn,rs ?? On Error Resume Next ?? Set GetOtherRs = Nothing
?? Select Case DataType ????? Case "Dbf" ???????? Set conn = GetDbfConnection( Path ) ????? Case "Dbc" ???????? Set conn = GetDbcConnection( Path ) ????? Case "Excel" ???????? Set conn = GetExcelConnection( Path ) ????? Case "Text" ???????? Set conn = GetTextConnection( Path ) ?? End Select ?? If conn Is Nothing Then Exit Function
?? Set rs = Server.CreateObject("ADODB.Recordset") ?? If Err.Number <> 0 Then Exit Function
?? rs.Open SQL,2 ?? If Err.Number <> 0 Then Exit Function ?? Set GetOtherRs = rs End Function
'--------------------------------------------------- Function GetSQLServerRs( Computer,Db,source,rs
?? On Error Resume Next ?? Set GetSQLServerRs = Nothing ?? Set conn = GetSQLServerConnection( Computer,Db ) ?? If conn Is Nothing Then Exit Function ?? ?? Set rs = Server.CreateObject("ADODB.Recordset") ?? If Err.Number <> 0 Then Exit Function ?? ?? rs.Open source,2 ?? If Err.Number <> 0 Then Exit Function ?? ?? Set GetSQLServerRs = rs End Function %> (编辑:威海站长网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|