Need help with Array

  • Thread starter Thread starter Dave Guenthner
  • Start date Start date
D

Dave Guenthner

Hi. I am trying to structure a command that returns an array. First,
let me show some working code:

string strEKey = AdminService.AccountGetEncryptionKey(intAccount,
"Account holder forgot encryption key");

This works. Notice the AdminService function. I want to do something
similar but the command returns an array not a string. The command
specifically performs a search, I have one piece of criteria and I do
not know how to structure the command.

Array:
AdminAPIBaseAccountInfoList[] = AdminService.CommunityFindAccounts(int
CommunityID, SAconnect.SEARCHFIELD FieldName, string FieldValue,
SAconnect.Account_Status status);

I know one of the pieces of information, for example Field name which
would be the user domain login account.

How can I perform the command:
I am trying something like this:

AdminAPIBaseAccountInfoList[] = AdminService.CommunityFindAccounts(,
SAconnect.SEARCHFIELD Domain, string myid,);

Also, the debugger is saying that the = has a "idenifier expected as
well"

Thanks in advance for any help.

Daveg
 
Dave Guenthner said:
Hi. I am trying to structure a command that returns an array. First,
let me show some working code:

string strEKey = AdminService.AccountGetEncryptionKey(intAccount,
"Account holder forgot encryption key");

This works. Notice the AdminService function. I want to do something
similar but the command returns an array not a string. The command
specifically performs a search, I have one piece of criteria and I do
not know how to structure the command.

Array:
AdminAPIBaseAccountInfoList[] = AdminService.CommunityFindAccounts(int
CommunityID, SAconnect.SEARCHFIELD FieldName, string FieldValue,
SAconnect.Account_Status status);

I know one of the pieces of information, for example Field name which
would be the user domain login account.

How can I perform the command:
I am trying something like this:

AdminAPIBaseAccountInfoList[] = AdminService.CommunityFindAccounts(,
SAconnect.SEARCHFIELD Domain, string myid,);

Also, the debugger is saying that the = has a "idenifier expected as
well"

You haven't declared a variable name. Use

AdminAPIBaseAccountInfoList[] lists =
AdminService.CommunityFindAccounts(...);

Note that your parameters are rather odd too - you aren't specifying
the first or the last ones, and you shouldn't be including the type for
the third parameter.
 
Back
Top