adjust array size depending on headers flag and initial starting point of indexer
This commit is contained in:
		
							parent
							
								
									317324a342
								
							
						
					
					
						commit
						bbea1976a4
					
				@ -1418,7 +1418,11 @@ Public Function TBLp_CrossJoin(ByRef tbl1() As String, ByRef tbl2() As String, B
 | 
				
			|||||||
    Dim m As Long
 | 
					    Dim m As Long
 | 
				
			||||||
    Dim h As Integer
 | 
					    Dim h As Integer
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    ReDim t(UBound(tbl1, 1) + UBound(tbl2, 1) + 1, UBound(tbl1, 2) * UBound(tbl2, 2))
 | 
					    If headers Then
 | 
				
			||||||
 | 
					        ReDim t(UBound(tbl1, 1) + UBound(tbl2, 1) + 1, UBound(tbl1, 2) * UBound(tbl2, 2))
 | 
				
			||||||
 | 
					    Else
 | 
				
			||||||
 | 
					        ReDim t(UBound(tbl1, 1) + UBound(tbl2, 1) + 1, (UBound(tbl1, 2) + 1) * (UBound(tbl2, 2) + 1) - 1)
 | 
				
			||||||
 | 
					    End If
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    h = 0
 | 
					    h = 0
 | 
				
			||||||
    If headers Then
 | 
					    If headers Then
 | 
				
			||||||
@ -1432,8 +1436,8 @@ Public Function TBLp_CrossJoin(ByRef tbl1() As String, ByRef tbl2() As String, B
 | 
				
			|||||||
        h = 1
 | 
					        h = 1
 | 
				
			||||||
    End If
 | 
					    End If
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    
 | 
					    m = 0
 | 
				
			||||||
    m = 1
 | 
					    If headers Then m = 1
 | 
				
			||||||
    For i = h To UBound(tbl1, 2)
 | 
					    For i = h To UBound(tbl1, 2)
 | 
				
			||||||
        For j = h To UBound(tbl2, 2)
 | 
					        For j = h To UBound(tbl2, 2)
 | 
				
			||||||
            For k = 0 To UBound(tbl1, 1)
 | 
					            For k = 0 To UBound(tbl1, 1)
 | 
				
			||||||
@ -1450,6 +1454,7 @@ Public Function TBLp_CrossJoin(ByRef tbl1() As String, ByRef tbl2() As String, B
 | 
				
			|||||||
            
 | 
					            
 | 
				
			||||||
End Function
 | 
					End Function
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Function ADOp_InsertRecordsS(ByRef Records() As String, ByRef con As Integer, ByVal TableName As String, Optional headers As Boolean) As Boolean
 | 
					Function ADOp_InsertRecordsS(ByRef Records() As String, ByRef con As Integer, ByVal TableName As String, Optional headers As Boolean) As Boolean
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Dim i As Integer
 | 
					    Dim i As Integer
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user