Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General 2 / April 2007



Tip: Looking for answers? Try searching our database.

Split Data According to length

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
genius.jain@gmail.com - 27 Apr 2007 08:35 GMT
Hi

Problem:
I am using vb6.0 in client application.
we r using winsock control to send data in bytes to server.
the program is successful but if data is large ie eg 90 kb it wont
connect to server so we have send data in nine chunks

what i m trying to do
i have to chexk the size of the string(Data) using lenb and if size iz
greater then 10 kb for eg if data is of 25 kb then i would have to
split data in 10kb,10kb and 5kb data .

How to divide data(string) in chunks of 10kb

split function has paramenters string and the delimeter ,bur to split
data according to size
J French - 27 Apr 2007 08:54 GMT
>Hi
>
[quoted text clipped - 13 lines]
>split function has paramenters string and the delimeter ,bur to split
>data according to size

S$ = Mid$( Src$, StartPos, ChunkLen )

I'm not sure why you are using LenB()
- I would expect the Unicode to be converted to ANSI

Also I would send smaller chunks, you'll not see much change in speed,
but if you run into problems you'll see it quicker (or rather you'll
be able to recover more quickly if you build in an intelligent resume)
genius.jain@gmail.com - 27 Apr 2007 13:32 GMT
HI

I am using lenb bcoz my string has japaneese characters and hence to
get the exact length in bytes as japaneese character is more then 1
bye

Thanx for ur suggestion to break data in small chumks and the syntax ,

Do any one have any idea of about how much data we can send through
sockets.(winsock control in vb6.0)
J French - 28 Apr 2007 08:22 GMT
>HI
>
>I am using lenb bcoz my string has japaneese characters and hence to
>get the exact length in bytes as japaneese character is more then 1
>bye

Not in Unicode - in Unicode all characters are 2 bytes long

>Thanx for ur suggestion to break data in small chumks and the syntax ,

>Do any one have any idea of about how much data we can send through
>sockets.(winsock control in vb6.0)

If it starts off as a Byte Array then I would send a Byte Array

From VB5 Help File :-
'When a UNICODE string is passed in, it is converted to an ANSI string
before being sent out on the network.'

Simply have a smaller Byte Array and copy in the relevant bytes.

I've no idea of the maximum amount of data you can send, the only
restriction is down to the thing receiving the data
- it could just sit there all day receiving gigabytes
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.