Click here to Skip to main content
15,921,577 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Multidimensional CArray? (innocent question) Pin
Christian Graus26-Nov-02 15:35
protectorChristian Graus26-Nov-02 15:35 
GeneralRe: Multidimensional CArray? (innocent question) Pin
Gary R. Wheeler29-Nov-02 2:39
Gary R. Wheeler29-Nov-02 2:39 
GeneralConvert CIPAddressCtrl to Cstring/DWord Pin
ydasari26-Nov-02 12:52
ydasari26-Nov-02 12:52 
GeneralLoading .LIB file and .DLL into MFC App. Pin
E326-Nov-02 10:51
E326-Nov-02 10:51 
GeneralRe: Loading .LIB file and .DLL into MFC App. Pin
perlmunger26-Nov-02 12:16
perlmunger26-Nov-02 12:16 
GeneralRe: Loading .LIB file and .DLL into MFC App. Pin
E326-Nov-02 14:10
E326-Nov-02 14:10 
GeneralRe: Loading .LIB file and .DLL into MFC App. Pin
Roman Fadeyev26-Nov-02 19:33
Roman Fadeyev26-Nov-02 19:33 
GeneralHelp! determine if ADO Field is PK or FK Pin
devvvy26-Nov-02 10:34
devvvy26-Nov-02 10:34 
Help! hate to get back to this old topic again, but must say that ADO docs is rather lame for C++ programmer. This is something that can be so easily done with VB - but i'm near the end of my VC module.

QUESTION 1:

I need to determine whether a given field is a primary key for foreign key. and put the result in a character string or int.

This is what I did:
char szPK[20];
for(i=0; i<20; i++)
{
szPK[i]='\0';
}
strcpy(szPK, (pRs->Fields->Item[j])->Properties->Item["KEYCOLUMN"]);

I think we're on the right track, execpt the return type.

error C2664: 'strcpy' : cannot convert parameter 2 from 'class _com_ptr_t<class _com_iiid<struct="" adocg::property,&struct="" __s_guid="" _guid_00000503_0000_0010_8000_0

i="" dont="" know="" smart="" pointer,="" so="" i="" have="" no="" idea="" how="" to="" convert:

(prs-="">Fields->Item[j])->Properties->Item["KEYCOLUMN"]

to type: char*


QUESTION 2: how can u tell FK from PK?


QUESTION 3: how can I determine the foreign key associated with a primary key on another table?

I need to get the associated table name and associated field name (FK) given a PK on a given table.

Thank!

Norm
thanks



norm
GeneralConverting C++ files to Visual C++ files Pin
Jennic26-Nov-02 8:26
Jennic26-Nov-02 8:26 
GeneralRe: Converting C++ files to Visual C++ files Pin
Paul M Watt26-Nov-02 9:12
mentorPaul M Watt26-Nov-02 9:12 
GeneralRe: Converting C++ files to Visual C++ files Pin
perlmunger26-Nov-02 12:08
perlmunger26-Nov-02 12:08 
GeneralRe: Converting C++ files to Visual C++ files Pin
valikac26-Nov-02 15:37
valikac26-Nov-02 15:37 
QuestionProgramable State Machine, XML? Pin
Jawache26-Nov-02 6:35
Jawache26-Nov-02 6:35 
AnswerRe: Programable State Machine, XML? Pin
RedZenBird26-Nov-02 6:46
RedZenBird26-Nov-02 6:46 
Generala little lost with MainFrame Pin
NickOne26-Nov-02 6:32
NickOne26-Nov-02 6:32 
GeneralDrawing line conneting two dialogs Pin
Crercio O. Silva26-Nov-02 6:25
Crercio O. Silva26-Nov-02 6:25 
GeneralRe: Drawing line conneting two dialogs Pin
Nick Parker26-Nov-02 6:33
protectorNick Parker26-Nov-02 6:33 
GeneralRe: Drawing line conneting two dialogs Pin
Crercio O. Silva26-Nov-02 13:08
Crercio O. Silva26-Nov-02 13:08 
GeneralRe: Drawing line conneting two dialogs Pin
Nick Parker26-Nov-02 17:06
protectorNick Parker26-Nov-02 17:06 
GeneralRe: Drawing line conneting two dialogs Pin
Scott H. Settlemier26-Nov-02 7:03
Scott H. Settlemier26-Nov-02 7:03 
GeneralRe: Drawing line conneting two dialogs Pin
Crercio O. Silva26-Nov-02 13:05
Crercio O. Silva26-Nov-02 13:05 
GeneralRe: Drawing line conneting two dialogs Pin
Maximilien26-Nov-02 7:46
Maximilien26-Nov-02 7:46 
GeneralRe: Drawing line conneting two dialogs Pin
Crercio O. Silva26-Nov-02 13:03
Crercio O. Silva26-Nov-02 13:03 
GeneralRe: Drawing line conneting two dialogs Pin
Maximilien26-Nov-02 15:20
Maximilien26-Nov-02 15:20 
GeneralRe: Drawing line conneting two dialogs Pin
Crercio O. Silva27-Nov-02 1:45
Crercio O. Silva27-Nov-02 1:45 

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.