"Sukhdev Gidwani" <[EMAIL PROTECTED]> wrote in message
news:45377@palm-dev-forum...
>
> Hi,
> I am writting an application which fetches record from a database
and
> then posts them on to a server the code goes this way
>
> for(int i=0;i < NumberOfRecords; i++)
> {
> // Code to Read the record and form a url with a get request
> if (sockHP)
> {
> INetLibSockClose(lRef,sockHP);
> sockHP = 0;
> }
> e = INetLibURLOpen(lRef,inetHP,(UInt8 *)urlP,NULL,&sockHP,
> evtWaitForever,0);
> e = INetLibSockHTTPReqCreate (lRef,sockHP,(UInt8 *)"GET",
(UInt8
> *)urlP,0);
> e = INetLibSockHTTPReqSend(lRef,sockHP,data,0,2000);
> }
>
> Although this for loop executes the number of times as the number of
records
> in the database
> In the Event loop only one request is actually sent to the server. i.e
the
> LAST request and the last record is added to the database on the
server.
INetLibSockHTTPReqSend does no real work -- it just sets up the internal
structures. You have to then complete a GET or POST loop that recevives
the returned data in order to have the response sent.
--
Ben Combee, [EMAIL PROTECTED]
Techwood Broadcasting Foundation, Austin Bureau
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/