Click here to Skip to main content
15,891,850 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Reading And Writting Files to Access Database using ADO Pin
Zac Howland31-Jul-06 11:16
Zac Howland31-Jul-06 11:16 
GeneralRe: Reading And Writting Files to Access Database using ADO Pin
Christopher Stratmann31-Jul-06 23:50
Christopher Stratmann31-Jul-06 23:50 
GeneralRe: Reading And Writting Files to Access Database using ADO Pin
Zac Howland1-Aug-06 3:46
Zac Howland1-Aug-06 3:46 
GeneralRe: Reading And Writting Files to Access Database using ADO Pin
Christopher Stratmann1-Aug-06 4:22
Christopher Stratmann1-Aug-06 4:22 
GeneralRe: Reading And Writting Files to Access Database using ADO Pin
Zac Howland1-Aug-06 4:40
Zac Howland1-Aug-06 4:40 
GeneralRe: Reading And Writting Files to Access Database using ADO Pin
Christopher Stratmann1-Aug-06 7:58
Christopher Stratmann1-Aug-06 7:58 
GeneralRe: Reading And Writting Files to Access Database using ADO Pin
Christopher Stratmann4-Aug-06 2:09
Christopher Stratmann4-Aug-06 2:09 
Questionwininet issue Pin
EpicYeti31-Jul-06 8:20
EpicYeti31-Jul-06 8:20 
Hello,

I'm having an issued figuring out how to use wininet to post form data to a website. So far I've been able to connect, send requests, and then read the result. However, I cannot seem to send form data to the website, and then read the resulting html the server sends back., (I.E. filling out the search form on the codeproject website.) I'm using the MFC version of wininet.

I connect:

CHttpConnection* pHttpConnection = sess.GetHttpConnection("www.codeproject.com");


sess is the CInternetSession object.
Then I create a request:

CHttpFile* pFile = pHttpConnection->OpenRequest("POST", "/");

CString header = _T("Content-Type: application/x-www-form-urlencoded");
CString mdata = _T("Search=wininet help");
		
pFile->SendRequest(header, header.GetLength(), (LPVOID)(LPCTSTR)mdata, mdata.GetLength());


When I do a pFile->Read() however, all i have received is the codeproject homepage, not the result from entering "wininet help" into the search form. Do I need to format the header differently? Or am I not requesting the correct object with OpenRequest? What am I missing?

Any help on this would be much appriciated. I'm new to wininet, and to writing internet client applications, so please bear with me, heh.

Thanks.
AnswerRe: wininet issue Pin
Zac Howland31-Jul-06 9:11
Zac Howland31-Jul-06 9:11 
GeneralRe: wininet issue Pin
EpicYeti31-Jul-06 9:52
EpicYeti31-Jul-06 9:52 
GeneralRe: wininet issue Pin
Zac Howland31-Jul-06 9:57
Zac Howland31-Jul-06 9:57 
GeneralRe: wininet issue Pin
EpicYeti31-Jul-06 10:25
EpicYeti31-Jul-06 10:25 
GeneralRe: wininet issue Pin
Lucky the code machine23-Feb-08 5:55
Lucky the code machine23-Feb-08 5:55 
QuestionProblems with Dialog Buttons Pin
kitty531-Jul-06 6:34
kitty531-Jul-06 6:34 
AnswerRe: Problems with Dialog Buttons Pin
toxcct31-Jul-06 6:40
toxcct31-Jul-06 6:40 
GeneralRe: Problems with Dialog Buttons Pin
Zac Howland31-Jul-06 6:45
Zac Howland31-Jul-06 6:45 
GeneralRe: Problems with Dialog Buttons Pin
toxcct31-Jul-06 6:47
toxcct31-Jul-06 6:47 
GeneralRe: Problems with Dialog Buttons Pin
kitty531-Jul-06 6:48
kitty531-Jul-06 6:48 
GeneralRe: Problems with Dialog Buttons Pin
toxcct31-Jul-06 6:56
toxcct31-Jul-06 6:56 
GeneralRe: Problems with Dialog Buttons Pin
Zac Howland31-Jul-06 8:04
Zac Howland31-Jul-06 8:04 
GeneralRe: Problems with Dialog Buttons Pin
kitty531-Jul-06 6:45
kitty531-Jul-06 6:45 
GeneralRe: Problems with Dialog Buttons Pin
toxcct31-Jul-06 6:52
toxcct31-Jul-06 6:52 
GeneralRe: Problems with Dialog Buttons Pin
Justin Tay31-Jul-06 7:15
Justin Tay31-Jul-06 7:15 
GeneralRe: Problems with Dialog Buttons Pin
David Crow31-Jul-06 8:31
David Crow31-Jul-06 8:31 
AnswerRe: Problems with Dialog Buttons Pin
valikac31-Jul-06 6:57
valikac31-Jul-06 6:57 

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.