ник: kot_k_k
а это мне кажется точно ускорит (если есть смысл в усорении? когда 2-3 уродня детей, а не 10-100ни - то конечно эсть)
Public Function FUN_TO_CHILDREN(STR_NUMBER_CARD As String) As Integer
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
Str_Num=STR_NUMBER_CARD
rst.Open "SELECT CLIENT_CARDS_TBL.* " _
& " From CLIENT_CARDS_TBL ", GLB_CONNECTION, adOpenKeyset, adLockOptimistic
rst.FindFirst "CLIENT_CARDS_TBL.PARENT_CARD = '" & Str_Num & "'"
Do While NoMatch= False
GLB_GROUP_TURN = GLB_GROUP_TURN + FUN_PERSONAL_TURN(rst("NUMBER_CARD"))
STR_NUMBER_CARD = rst("NUMBER_CARD")
Id_Go=rst.Bookmark
rst.FindFirst "CLIENT_CARDS_TBL.PARENT_CARD = '" & Str_Num & "'"
if NoMatch= False then FUN_TO_CHILDREN (STR_NUMBER_CARD)
rst.rst.Bookmark=Id_Go
rst.FindNext "CLIENT_CARDS_TBL.PARENT_CARD) = '" & Str_Num & "'"
Loop
rst.Close
Set rst = Nothing
End Function
|