Click here to Skip to main content
15,898,371 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CreateProcessAsUser Question Pin
Richard Andrew x645-Jan-12 8:03
professionalRichard Andrew x645-Jan-12 8:03 
GeneralRe: CreateProcessAsUser Question Pin
Lucidation5-Jan-12 13:38
Lucidation5-Jan-12 13:38 
GeneralRe: CreateProcessAsUser Question Pin
Richard Andrew x645-Jan-12 13:45
professionalRichard Andrew x645-Jan-12 13:45 
GeneralRe: CreateProcessAsUser Question Pin
Lucidation6-Jan-12 12:25
Lucidation6-Jan-12 12:25 
GeneralRe: CreateProcessAsUser Question Pin
Richard Andrew x646-Jan-12 12:53
professionalRichard Andrew x646-Jan-12 12:53 
QuestionCommand Routing From CDialogBar to CMainFrame Pin
sdancer7530-Dec-11 9:41
sdancer7530-Dec-11 9:41 
SuggestionRe: Command Routing From CDialogBar to CMainFrame Pin
Randor 30-Dec-11 15:06
professional Randor 30-Dec-11 15:06 
QuestionIntializing a structure array to store SQL Results from a class Pin
jkirkerx30-Dec-11 7:15
professionaljkirkerx30-Dec-11 7:15 
I created structures to pass arrays of data to SQL Server to write a user record with no problem.

So I thought using the same method would work in reverse for retrieving an array of user records to populate a List Box.

But I can't figure out how to initialize the structure in my class as an array. I can Initialize the structure as a single record, and pass it to the function.

I created a sql server call to get the record count first, so I can size the array.

I thought it would be written like this ...
dbUA.UA_LISTBOX *uaList = new dbUA.UA_LISTBOX[dwCount];

My Class Strucure and function
CSS
class DB_UserAccount {

public:

    struct UA_Listbox {
        INT             iUserID;
        WCHAR           *szFirstName;
        WCHAR           *szLastName;
        WCHAR           *szAccountName;
    } UA_LISTBOX;

BOOL _get_UserAccount_Listbox_Count( DWORD &dwCount );
BOOL _get_UserAccount_Listbox_Info( UA_Listbox &pzUserList );

//My Function that calls the class
BOOL UserAccount_Index::_load_UserAccount_Index_Listbox( void )  
{
	DB_UserAccount dbUA;
	DWORD dwCount;
	dbUA._get_UserAccount_Listbox_Count( dwCount );	


	return TRUE;
}

AnswerRe: Intializing a structure array to store SQL Results from a class Pin
Code-o-mat30-Dec-11 8:30
Code-o-mat30-Dec-11 8:30 
GeneralRe: Intializing a structure array to store SQL Results from a class Pin
jkirkerx30-Dec-11 9:15
professionaljkirkerx30-Dec-11 9:15 
GeneralRe: Intializing a structure array to store SQL Results from a class Pin
Code-o-mat30-Dec-11 9:33
Code-o-mat30-Dec-11 9:33 
GeneralRe: Intializing a structure array to store SQL Results from a class Pin
jkirkerx30-Dec-11 10:01
professionaljkirkerx30-Dec-11 10:01 
GeneralRe: Intializing a structure array to store SQL Results from a class Pin
Code-o-mat30-Dec-11 10:06
Code-o-mat30-Dec-11 10:06 
GeneralRe: Intializing a structure array to store SQL Results from a class Pin
jkirkerx31-Dec-11 8:51
professionaljkirkerx31-Dec-11 8:51 
GeneralRe: Intializing a structure array to store SQL Results from a class Pin
Code-o-mat31-Dec-11 8:57
Code-o-mat31-Dec-11 8:57 
AnswerRe: Intializing a structure array to store SQL Results from a class Pin
jschell30-Dec-11 8:35
jschell30-Dec-11 8:35 
GeneralRe: Intializing a structure array to store SQL Results from a class Pin
jkirkerx30-Dec-11 9:22
professionaljkirkerx30-Dec-11 9:22 
GeneralRe: Intializing a structure array to store SQL Results from a class Pin
Vaclav_30-Dec-11 12:24
Vaclav_30-Dec-11 12:24 
GeneralRe: Intializing a structure array to store SQL Results from a class Pin
jkirkerx30-Dec-11 12:40
professionaljkirkerx30-Dec-11 12:40 
GeneralRe: Intializing a structure array to store SQL Results from a class Pin
jschell31-Dec-11 13:10
jschell31-Dec-11 13:10 
GeneralRe: Intializing a structure array to store SQL Results from a class Pin
jkirkerx31-Dec-11 13:14
professionaljkirkerx31-Dec-11 13:14 
QuestionUNIT how to convert int Pin
dlsyaim29-Dec-11 21:59
dlsyaim29-Dec-11 21:59 
AnswerRe: UNIT how to convert int Pin
_Flaviu29-Dec-11 22:03
_Flaviu29-Dec-11 22:03 
AnswerRe: UNIT how to convert int Pin
Richard MacCutchan29-Dec-11 22:09
mveRichard MacCutchan29-Dec-11 22:09 
GeneralRe: UNIT how to convert int Pin
dlsyaim29-Dec-11 22:26
dlsyaim29-Dec-11 22:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.