You need to sign in to do that
Don't have an account?
MaxiMize
Account()
I'm still pretty new to SSIS, but I've *almost* got things working. I'm stuck on why I can't create an Account object (called, for example, Acct) as an Array of Accounts. It continually errors out on that point, saying that the "Object reference not set to an instance of an object. Here is the code for what I'm doing in that section. If anyone has any ideas, I'd be most appreciative!
Dim Acct(200) As Account
Dim recCounter As Integer = 0
'Assign values to Update Data
For recCounter = 0 To 200
Acct(recCounter).Id = SoRec(recCounter).Id
Next
Dim Acct(200) As Account
Dim recCounter As Integer = 0
'Assign values to Update Data
For recCounter = 0 To 200
Acct(recCounter).Id = SoRec(recCounter).Id
Next
this will only create the array, it will not put any values in the array, so you have an array of size 200, where each item is NULL.
then you try and set the Id on one of these, and you get a null pointer exception.
You need to create an instance of the account object first, something like.
Dim Acct(200) As Account
Dim recCounter As Integer = 0
'Assign values to Update Data
For recCounter = 0 To 200
Acct(recCounter) = new Account()
Acct(recCounter).Id = SoRec(recCounter).Id
Next
In the event anyone stumbles in here and is as much of a novice as I, the answer is just as he said. To modify my code, it would then read:
-B