Mega Search
23.2 Million


Sign Up

Make a donation  
BUG for TClientSocket and TClientDataSet  
News Group: borland.public.cppbuilder.internet.socket

Whenever using a TClientSocket and TClientDataSet (Socket Server)
at the same time
eg:

ClientSocket->Open();
.......
ClientDataSet->Open();

error must be occured


class EvariantInvalidArgError with message 'Invalid argument'
class ESocketConnectionError with message 'Error reading form socket'

if ClientSocket don't open, this is no error


How can I solve it???????

Help




Vote for best question.
Score: 0  # Vote:  0
Date Posted: 29-Nov-2007, at 10:30 PM EST
From: Emmanuel
 
Re: BUG for TClientSocket and TClientDataSet  
News Group: borland.public.cppbuilder.internet.socket
Too bad
"Emmanuel"  дÈëÏûÏ¢ÐÂÎÅ:474fd757@newsgroups.borland.com...
> you can make a simple program to test it, it must be error
>
> "Remy Lebeau (TeamB)"  дÈëÏûÏ¢ÐÂÎÅ:474fadb6$1@newsgroups.borland.com...
>>
>> "Emmanuel"  wrote in message
>> news:474f9ef5@newsgroups.borland.com...
>>
>>> after that update or Get data by TClientDataSet from/to
>>> machine A, Error is occured
>>
>> Again, there is no way to diagnose that with the limited information you
>> have provided so far.
>>
>>> I have also think may be the local port problem
>>
>> TClientDataSet uses a random local port, so there shouldn't be any 
>> conflict
>> there.
>>
>>> how can I set the local port for TClientDataSet,and SocketConnection?
>>
>> You can't. They don't expose that functionality.
>>
>>
>> Gambit
>>
>>
>
> 



Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 11-Dec-2007, at 8:15 AM EST
From: Emmanuel
 
Re: BUG for TClientSocket and TClientDataSet  
News Group: borland.public.cppbuilder.internet.socket
you can make a simple program to test it, it must be error

"Remy Lebeau (TeamB)"  дÈëÏûÏ¢ÐÂÎÅ:474fadb6$1@newsgroups.borland.com...
>
> "Emmanuel"  wrote in message
> news:474f9ef5@newsgroups.borland.com...
>
>> after that update or Get data by TClientDataSet from/to
>> machine A, Error is occured
>
> Again, there is no way to diagnose that with the limited information you
> have provided so far.
>
>> I have also think may be the local port problem
>
> TClientDataSet uses a random local port, so there shouldn't be any 
> conflict
> there.
>
>> how can I set the local port for TClientDataSet,and SocketConnection?
>
> You can't. They don't expose that functionality.
>
>
> Gambit
>
> 



Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 30-Nov-2007, at 5:28 PM EST
From: Emmanuel
 
Re: BUG for TClientSocket and TClientDataSet  
News Group: borland.public.cppbuilder.internet.socket
"Emmanuel"  wrote in message
news:474f9ef5@newsgroups.borland.com...

> after that update or Get data by TClientDataSet from/to
> machine A, Error is occured

Again, there is no way to diagnose that with the limited information you
have provided so far.

> I have also think may be the local port problem

TClientDataSet uses a random local port, so there shouldn't be any conflict
there.

> how can I set the local port for TClientDataSet,and SocketConnection?

You can't. They don't expose that functionality.


Gambit



Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 29-Nov-2007, at 10:29 PM EST
From: Remy Lebeau \(TeamB\)
 
Re: BUG for TClientSocket and TClientDataSet  
News Group: borland.public.cppbuilder.internet.socket
>
> Don't open them at the same time, obviously.  Without knowing more about 
> why
> the EVariantInvalidArgError is being raised, all I can guess is that both
> components are trying to use the same port at the same one, and one of 
> them
> is going to fail as a result.
My Program is that
Firstly open the TClientDataSet by SocketServer(port 211) to machine A, 
there is no problem
Secondly Open a TClientSocket connect to  other machine B (Remote port is 
9000) , there is also no problem,
and then communicate to B,and get data from machine B,  there is also no 
problem
after that update or Get data by TClientDataSet from/to machine A, Error is 
occured

I have also think may be the local port problem, but how can I set the local 
port for TClientDataSet,and SocketConnection?

>
> Gambit
>
> 



Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 30-Nov-2007, at 1:31 PM EST
From: Emmanuel
 
Re: BUG for TClientSocket and TClientDataSet  
News Group: borland.public.cppbuilder.internet.socket
"Emmanuel"  wrote in message
news:474ecbea@newsgroups.borland.com...

> Whenever using a TClientSocket and TClientDataSet
> (Socket Server) at the same time
> eg:
>
> ClientSocket->Open();
> ......
> ClientDataSet->Open();
>
> error must be occured
>
> class EvariantInvalidArgError with message 'Invalid argument'

There is no way to track that down without seeing a stack trace leading up
to the exception being raised.

> class ESocketConnectionError with message 'Error reading form socket'

That exception is only raised when the socket API recv() function does not
return as many bytes as were asked for during a reading operation.  Which,
frankly, is really stupid on TClientDataSet's part, because that is not the
proper way to handle socket data.  recv() is never guaranteed to return all
of the requested bytes in one call.  If the return value is > 0 and more
bytes are expected, recv() is supposed to be called again.  But
TClientDataSet does not do that.

> if ClientSocket don't open, this is no error
>
> How can I solve it???????

Don't open them at the same time, obviously.  Without knowing more about why
the EVariantInvalidArgError is being raised, all I can guess is that both
components are trying to use the same port at the same one, and one of them
is going to fail as a result.


Gambit



Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 29-Nov-2007, at 7:32 PM EST
From: Remy Lebeau \(TeamB\)