Als Subfunktion zu diesen Funktionen gibts die beiden:
Public Function RetrieveRSNOUPPERCASE(ByVal strSQL As String, Optional ByVal _
bucase As Boolean = False) _
As ADODB.Recordset
'Opens a Read-Only-Recordset from the database
On Error GoTo PROC_ERR
objErr.Push "CData.RetrieveRSNOUPPERCASE"
Dim ADORecordset As ADODB.Recordset
Set ADORecordset = New ADODB.Recordset
If bucase Then
ADORecordset.Open UCase(strSQL), ADOConn.Connection, adOpenForwardOnly, _
adLockReadOnly
Else
ADORecordset.Open strSQL, ADOConn.Connection, adOpenForwardOnly, _
adLockReadOnly
End If
Set RetrieveRSNOUPPERCASE = ADORecordset
Set ADORecordset = Nothing
PROC_EXIT:
objErr.Pop
Exit Function
PROC_ERR:
objErr.HandleError
Resume PROC_EXIT
End Function
Public Function RetrieveRS(ByVal strSQL As String) _
As ADODB.Recordset
'Opens a Read-Only-Recordset from the database
On Error GoTo PROC_ERR
objErr.Push "CData.RetrieveRS"
Dim ADORecordset As ADODB.Recordset
Set ADORecordset = New ADODB.Recordset
ADORecordset.Open funInsertUCaseInSQL(UCase(strSQL)), ADOConn.Connection, _
adOpenForwardOnly, adLockReadOnly
Set RetrieveRS = ADORecordset
Set ADORecordset = Nothing
PROC_EXIT:
objErr.Pop
Exit Function
PROC_ERR:
objErr.HandleError
Resume PROC_EXIT
End Function Oder es liegt an den Array-Funktionen die in der Import-Schleife aufgerufen werden?
Public Function funGetArrayValue(ByVal sName As String, ByVal arr As Variant, _
Optional ByVal iRowIndex As Integer = 1) As Variant
' This function is useful for getting specific values from the 2-d arrays
' containing recordsets (used widely in the program),
' without having to know their actual index (which could be changed when the
' table is modified for ex.).
'
' Pass iRowIndex if you have a recordset containing more than one row and you
' know that particular index.
Dim i, j As Integer
j = -1
For i = LBound(arr, 2) To UBound(arr, 2)
If UCase(sName) = UCase(arr(0, i)) Then
j = i
Exit For
End If
Next i
If j > -1 Then
funGetArrayValue = arr(iRowIndex, j)
Else
funGetArrayValue = Null
End If
End Function
Public Function funSetArrayValue(ByVal sName As String, ByVal NewValue, ByVal _
arr As Variant, Optional ByVal iRowIndex As Integer = 1) As Variant
Dim i, j As Integer
j = -1
For i = LBound(arr, 2) To UBound(arr, 2)
If UCase(sName) = UCase(arr(0, i)) Then
arr(iRowIndex, i) = NewValue
j = i
Exit For
End If
Next i
If j > -1 Then
funSetArrayValue = arr
Else
funSetArrayValue = Null
End If
End Function tjo, ansonsten fällt mir einfach nix mehr ein, an was das liegen könnte  |