Microsoft
Software
Hardware
Network
Question : Array Help
I have an array that gets populated from a datatable.
The problem I am facing, I need the array to have increments of 4.
If the datatable only has 2 records, I need to pad the array with 2 additional positions.
If the datatable only has 13 records, I need to pad the array with 3 additional etc. etc.
Any thoughts.
Code Snippet:
1:
arrToLabels(i) = "To:" + DtSet.Tables(0).Rows(i).Item(0) + "-" + DtSet.Tables(0).Rows(i).Item(1)
Open in New Window
Select All
Answer : Array Help
If DtSet.Tables(0).Rows / 4 = 0 Then
arrSize = DtSet.Tables(0).Rows
Else
arrSize = DtSet.Tables(0).Rows + (4 - (DtSet.Tables(0).Rows Mod 4))
End If
Random Solutions
setting user permession on ad directories
Does anybody know of some neat SQL code which can calculate the date of birth of a person who is 4 1/2 today?
Office communicator popup
Module to control variable forms - errors passing form name
How to use Windows 2000 to amplify microphone input, and output to speaker?
Is it important to delete WRL files
Microsoft Exchange unable to open default email folders
how to make CSS for the web site developed in asp.net using VS2005
Removing Map drives if exist before creating them using scripts.
Access denied for backup operator user