Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Visual Basic

See Related Forum Messages: Follow the Links Below to View Complete Thread

MSCOMM Problem Rx'ing Large Binary Data Packet
I am attempting to receive a large binary data packet (150-300k) and write it to a binary file.

There is no problem except this: I can only receive 4.7k of any size packet I try to receive. It is not a problem with writing to the file because I can easily and quickly write a file with 300k of random numbers.

There is no handshaking, RThreshold is 1, SThreshold is 0, the in- and out-buffer sizes have been varied from 256 to 8192 and I still receive only exactly 4.7k of what is sent.

Can anybody lend some assistence please?

Thanks much, any questions, let me know.

MSCOMM - Can't Send/receive Large Data
Hi! I have created a 'Terminal' with VB MSCOMM and its working fine(sending/receiving data). But when I try to send large data('1234567890' x 10000), the data would be truncated or getting error from the MSCOMM.

I have tried to set the 'InBuffeSize' and 'OutBufferSize' to the maximum limit 31744, but only could manage to get around half the data. Heres the sample -

Private Sub SendData()
dim i as long
dim strData as string
for i = 1 to 10000
strdata=strdata & "1234567890"

mscomm1.output = strdata
End Sub

Case comEvReceive
strIn = strIn & mscomm1.input

Please advice,

Problem Receiving Large Amount Of Data In MSCOMM Control

I use the MSCOMM control to send and receive data packets that are 10 bytes long. This works perfectly well..

I now want to receive 524 bytes of data I do the following


dim cCh as string

Private Sub SetupCOMM
comRS485.PortOpen = False
comRS485.RThreshold = 524
comRS485.InputLen = 524
comRS485.InBufferSize = 524
comRS485.PortOpen = True
end sub

Private Sub comRS485_OnComm()

Dim n As Integer

Select Case comRS485.CommEvent

Case comEvReceive:

cCh = cCh & comRS485.Input

End Select

End Sub


cCh contains the data captured by the MSCOMM.

Using the above code I can sometimes receive the correct amount of data. But mostly it does not receive all the data.

It seems data is being lost somewhere...could anyone explain where ???


Binary Data In Using MSComm?
Hello! I'm new to vb and also new here! I have a problem and if someone could help i'd be gratefull! I need to read 24 bit data from a ad. It's sending it all the time. I need a little program that shows me the data that comes in, displays it for example in text box? Make any sense?
Edit: I don't need to read the value all the time, lets say in every 10 seconds when 24 bits have arrived.

Edited by - jusmar74 on 2/15/2005 2:00:50 AM

Sending Binary Data With MSComm
I'm really new at working with mscomm. I've gone thru a number of posts on this site including stickies and Bill Soo's mini-tutorial--but I'm still having problems trying to figure out the following.
I'm trying to send binary data to an external timer thru the serial port.
Below is an example of my code ..
Dim bytArray(7) As Byte
MSComm1.Settings = "9600,N,8,1"
MSComm1.InputMode = comInputModeBinary
MSComm1.InputLen = 0
MSComm1.PortOpen = True
bytArray(0) = 200
bytArray(1) = 30
bytArray(2) = 0
bytArray(3) = 5
bytArray(4) = 1
bytArray(5) = 0
bytArray(6) = 0
bytArray(7) = 245

MSComm1.Output = bytArray

The above doesn't work. Can someone tell me what I'm doing wrong or/and point me in the direction of some sample code that does something similar?

Problems With MSComm And Binary Data
Hi, first of all sorry for my english ... isn't my mother tonge.

I have a problem with MSComm. I need to send binary data (the binary number 00001100) using the MSComm. I declare a variable as follows:

Dim data as byte

and after that I fill it this way:


In order to send the data i used the MsComm control :


But it doesn't work. It gives me an error : the value of the property is not valid

What am i doing wrong? Please help me i am complete stucked on this and i cant move forward if i don't send this data to the modem i am using

Receiving Binary Data With Mscomm

I have a problem to receive binary data from a rs232 device which is connected to my serial port. I receive only strange letters en symbols but I want to receive binary data. I have tried a couple of codes which are posted on this forum but it still don't work.

With a shareware program to receive serial data I can read the data perfect, why can't I do it with visual basic.

Thanks for your help.

Storing Large Amounts Of Binary Data (>8K) In SQL Server
Hey Folks:

Here is my question, is it possible to populate ADO parameter object with more than 8K of data? The parameter is used for a stored procedure.

I understand that I probably could use the AppendChunk method to get all the data into it. However, what datatype would I use? The datatypes IMAGE and TEXT are unavailable. Any ideas?

Codito Ergo Sum...
Erich Karch :
"A government is a body of people, usually notably ungoverned."

Edited by - LordKarch on 9/20/2002 11:39:24 AM

Sending Binary Data To Mscomm.output
Hi Members
I'm trying to write a code that sends a Binary Data through the Comm port using mscomm.output

It is fine when I'm sending Characters like:
Mscomm1.output = "A"

But I'm Getting Run-Time Error 380 with Invalid Property Value when I'm using
Msomm1.output= &h81

Any Ideas why???

Thanks In Advance

Receive Binary Data By MSComm Control?
Hi! I just need to know how to receive BINARY DATA by using the OnComm in MSComm control and place the received data into textbox. Thank for your help!!!!

regards, Jesse

How Can I Send Binary Data Use MSComm Control?
I try to use MSComm RS232 to send binary command to board, but i don't know how to use. If the format just like send normal ASIC characters?? If send binary data need send byte one by one??
I wonder if someone can give me a easy example.

Thank you!

Best Regards,

Kevin Shen

Send/Receive Binary Data Via MSCOMM Help Needed
I'm trying to communicate between the PC and a device. This device has three lines: Receive, Transmit, and Ground (no handshaking lines).

I want to send data to the device in the following format:
Command Byte | Parameter Byte(s) (where applicable)

The device then responds with
Command Byte | Parameter Byte(s) (where applicable)

I've set the MSCOMM control up as Input Binary Mode
I've also set the input length to 8 to read 8 bits from the receive buffer at a time.

My basic algorithm is as follows:

Declare byte array
Write bytes to array, command byte at 0, parameter bytes following
perform an output with the byte array

Declare a second byte array
Perform an input, sending the data to byte 0 of the array
perform an input, sending the data to byte 1 of the array

First, will this method of sending data work?
Second, when I stepped through the program, I got a type mismatch at the input. I wound up rewriting the code as follows (showing the first actual VB input code):
bytReturnData(0) = Val(Form1.MSCOMM1.Input)

It looks to me like this will work, but looking at some other posts on the Internet, I'm not so sure now. I will probably modify my algorithm to watch for inbuffercount > 8 before each input.

The communication parameters are: 4800, N, 8, 1

Please advise me on any part of this, as it is a project at work. I was actually looking to verify that InputLen=8 in binary input mode would set the length to 8 bits instead of 8 characters, but still haven't found the answer to that yet.

Thanks for any help you may be able to provide.

Converting A Binary Packet Into Readable Text
hey guys, wondering if you could help me with this problem. im writing a program that will query a quake2 master server (, which it does fine, but then the server sends back a packet that im guessing is in binary format, but i cant figure out how to parse it and make it readable, purhaps you can help me. when i query it the data i get back looks like this, any help would be apreciated:

servers vm>ܻm Aۈm?|mB-e/mihm%emPʃm;*mzm`m@1-mB-e2m@1(m@1(m.̮mP[mmFhm;,m@8m>@m*&mSm Bl*m.mmpm?|mFm~|mm*&m%emрyIm ~|mm$±}@mрyImBmmÕ
m8ΐm恊m>@m$Pa!mÕ m@1(mP[mFmܻm
Ⱥ m._^Omiimܻmiim @8mܻm ~|mmBP85mpI}

MSCOMM Transfer Large Files
I have a client and server application, the client conects to the server via modem to modem over a phone line.
Once connected I transfer a file across then close the communications.
My problem is it works ok for small files, but anything larger than 5k and it fails to transfer anything and the XferTransferred property never sees anything transfered as well.
The client just receives the following responses:

23:41:38.936 RX>> [1] <XON>
23:41:38.936 RX>> [8] 23be50<CR>
23:41:38.919 RX>> [8] 01000000
23:41:38.904 RX>> [1] B
23:41:38.904 RX>> [3] **<CAN>
23:41:28.623 RX>> [8] 3be50<CR> <XON>
23:41:28.623 RX>> [8] 10000002
23:41:28.592 RX>> [3] <CAN> B0
23:41:28.577 RX>> [2] **
23:41:18.327 RX>> [1] <XON>

Does anyone have any ideas?

Binary Large Objects Into .jpg's

I have some code which extracts Binary Large Objects (BLOBS) from an Access2000 table and places the contents of each BLOB into a file. The BLOBS are pics and are .jpg's
The code runs without problem, adds the path names of the new files to another field in the same table in the database and creates the files but these new .jpg files will not open in any graphics program. Does anyone have a suggestion about how to remedy this.

It seems as though the information is not re-assembled correctly.

Here's the code...apologies if its too long.

Option Compare Database
Option Explicit

Const CONST_TABLENAME As String = "MainPropsQuery" 'Where the Blobs are to be found....only props which have Blobs

Const CONST_FIELD_NAME As String = "TestPicPaths" 'Field in which the Newfile name is stored

Const CONST_PICTURE_FOLDER As String = "C:FilePics" 'Where the Newfile will be stored

Const BlockSize = 32768

'Object of this is to get Pics* OUT of a bloated database INTO .jpg files,
'as well as storing the path & pic FileName in a field in the same table
'*All pics started life as .jpg!

'First construct the NewFile name
Private Sub WriteFile()

Dim BytesRead As Variant, BytesWritten As Variant
Dim Msg As String
Dim db As Database
Dim T As Recordset
Dim NewFileName As String

' Open the table as decribed by CONSTANT
Set db = CurrentDb()
Set T = db.OpenRecordset(CONST_TABLENAME, dbOpenDynaset)


'For each BLOB, Construct the New filename and add it to the field 'TestPicPaths'

Do Until T.EOF

NewFileName = CONST_PICTURE_FOLDER & T.Fields("JmRefNo") & ".jpg"

'e.g. If JmRefNo is V220 then NewFileName = C:FilePicsV220.jpg


T.Fields(CONST_FIELD_NAME) = NewFileName


'For each record, use 'WriteBLOB() to chop up the file into chunks and append it to the NewFile

Call WriteBLOB(T, "TestPics", NewFileName)


'Msg = "Finished writing """ & Destination & """"
' Msg = Msg & Chr$(13) & ".. " & BytesWritten & " bytes written."
'MsgBox Msg, 64, "Copy File"

End Sub

Public Function WriteBLOB(T As Recordset, sField As String, Destination As String)
Dim NumBlocks As Integer, DestFile As Integer, i As Integer
Dim FileLength As Long, LeftOver As Long
Dim FileData As String
Dim RetVal As Variant

On Error GoTo Err_WriteBLOB

' Get the size of the field.
FileLength = T(sField).FieldSize

If FileLength = 0 Then
WriteBLOB = 0
Debug.Print "Very Small BLOB"
Exit Function

End If

' Calculate number of blocks to write and leftover bytes.
NumBlocks = FileLength BlockSize
LeftOver = FileLength Mod BlockSize

' Remove any existing destination file.
DestFile = FreeFile
Open Destination For Output As DestFile
Close DestFile

' Open the destination file.
Open Destination For Binary As DestFile

' SysCmd is used to manipulate the status bar meter.
RetVal = SysCmd(acSysCmdInitMeter, "Writing BLOB", FileLength / 1000)

' Write the leftover data to the output file.
FileData = T(sField).GetChunk(0, LeftOver)
Put DestFile, , FileData

' Update the status bar meter.
RetVal = SysCmd(acSysCmdUpdateMeter, LeftOver / 1000)

' Write the remaining blocks of data to the output file.
For i = 1 To NumBlocks
' Reads a chunk and writes it to output file.
FileData = T(sField).GetChunk((i - 1) * BlockSize + LeftOver, BlockSize)
Put DestFile, , FileData

RetVal = SysCmd(acSysCmdUpdateMeter, ((i - 1) * BlockSize + LeftOver) / 1000)
Next i

' Terminates function
RetVal = SysCmd(acSysCmdRemoveMeter)
Close DestFile
WriteBLOB = FileLength
Exit Function

WriteBLOB = -Err

Exit Function

End Function

'Adapted from

Thanks very much!

Writing Large Binary Value To Registry
I am trying to write a registry value as below:

[HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet Settingsones1]
hex:30,74,03,02,00,00,30,6e,30,23,06,a,2b,06,01,04,01,82,37,0f,03,01 ,30,15,06,09,2b,06,01,04,01,82,37,0f,01,31,8,30,06,03,02,00,01,30,00 ,30,23,06,0a,2b,06,01,04,01,82,37,0f,03,02,30,15,6,09,2b,06,01,04,01 ,82,37,0f,01,31,08,30,06,03,02,00,01,30,00,30,22,06,0a,2b,06,01,04,01 ,82,37,0f,03,03,30,14,06,09,2b,06,01,04,01,82,37,0f,01,31,07,30,05,03 ,01,00,30,00

I have tried code such as this with no success.
My.Computer.Registry.SetValue(regpath, regkey, New Byte() {30, 74, 03, 02, ect....}, RegistryValueKind.Binary)

Any suggestions?

How To Read Large Binary File
I use the following code to read a file as binary:

ReDim buffer(FileLen(filepath) - 1)
Open filepath For Binary As 1
Get #1, 1, buffer
Close #1

The code works fine is the file size is small. If the file size is large, error happened.

How can i read large file?

Reading Large File As Binary
Got a question about reading a large file and that is broken into 2816 byte records. I can open the file and get the information for the first 2816 bytes but I get no data for the rest of the file.
I dont know what I am doing wrong. Someone please let me know. Thanks

Using code below.

Dim strtext As String
Dim ft As Integer
Dim Y(2186) As Byte
Dim FILENAME2 As String
Open FILENAME For Binary Access Read Shared As #ft

Do While Not EOF(ft)

Get #ft, , Y
strtext = StrConv(Y, vbUnicode)
SerialNumber = Left(strtext, 7)


Close #ft

Handling Large (binary) Files
Hello VBWorld browsers,

I'm writing an application that use binary files as input. The files are quite big (>100MB) and the internal data types quite small (8 bytes each). This takes hours to browse through all the records due to the many "get" actions.
The solution would be to read the file in memory in big chunks first.
Before starting to write the code for that I wonder if anyone out there has done this already.
I heard that in C, there is a "memfile" function that aut. takes care of loading the file in memory. Does this (or something similar) exists in VB 6.x as well? that would be even easier and, probably, much faster as well.

hope to hear from anyone soon,


Walter De Jean (Belgium)

Binary Searching Large String Array ...
Hey All,

I'm trying to code a Binary Search a large sequential string array. Say I search for "a" I need to find the position of the 1st instance of "a" in the array. I won't always be searching for a single character either sometimes it will be 2 .. 3 .. 4 letters .. really dependant on the user I guess.

In the case of "a" I need to find:
zArray(0) = "2133"
zArray(1) = "2233"
zArray(2) = "alex" <- this position
zArray(3) = "andrew"
zArray(4) = "arnk"
zArray(5) = "aven"
zArray(6) = "bob"

The array will have anywhere from 1000 elements to 20,000.

I have done some brainstorming on the situation and I should be detecting for
-if search doesn't exist at all
-if search posistion is LBound() of array

there almost always be multiple instances of the 1st character position.

I'm not to sure how to go about this, I was taught in school how to do basic binary searching but was never taught how to handle multiple instances ect ... ...

In anycase I hope I was clear enough in my explination so that you know my problem. I would appriciate any points in the right direction.


How To Send Binary To PBX Thru MSCOMM
I am developing a serial communication application to PBX system, Any body could help me how to send binary to PBX thru MSCOMM? ..

Thanks a lot in advance


MSComm In Binary Mode
for work i need to communicate with an external SBC which i have built. It need to us MSComm in Binary mode to make full use of the 8 bits sent, rather than ascii mode.

I am having trouble retrieving the data received at the com port (only having trouble in binary mode). I have the following code:

Private Sub MSComm1_OnComm()
Dim iDispint As Integer
Dim sDispstr As String

If MSComm1.CommEvent = comEvReceive Then

sDispstr = MSComm1.Input
iDispint = Asc(sDispstr)
txtLCD_line2.Text = iDispint

End If
End Sub

now when MSComm is in text mode this works fine but i am limited to 0-127 (only 7bits).
in Binary mode i get an invalid procedure call or argument error.

When i try to read the MSComm1.Input into a byte i get a type mismatch error:

Private Sub MSComm1_OnComm()
Dim bDispbyt As Byte
Dim iDispint As Integer
Dim sDispstr As String

If MSComm1.CommEvent = comEvReceive Then

dDispbyt = MSComm1.Input
'iDispint = Asc(sDispstr)
'txtLCD_line2.Text = iDispint

End If
End Sub

any help would be greatly appreciated



Read Binary Value From MSComm!!!!

I'm trying to send a hex value from a device to the serial port. I need to read the hex value from the port but if it's in text mode then I get a letter, not the actual hex, so how do I go about getting the hex value? ie The hex value is obviously sent digitally so, get the '101010101' or whatever, instead of the letter... I am baffled and I can't use asc() as it's not the ascii value of the letter that I'm after, it's the hex value. (Not the hex of the asc either!) And hex() can't be done on a string... I'm am completely baffled!!! Any help, any code, any ideas!!! Plllllllleaaaaase! Maybe there's another way or an easier thing I'm missing...



Problem With Reading And Writing Large Binary Files Using Vb6

I have written a backup programme.
In this, I am reading and writing files in binary mode as follows:
In this, I tried big files more than 3GB reading and writing. exactly at 2GB both files gave error that bad record number at the time of reading Get statement. What would be the reason ? Just now i tried another 3GB file but same problem exactly at 2147450880 byes it gives error 63:Bad Record Number at the time of reading.
Please help me.

Dim fnum1 As Integer, fnum2 As Integer
Dim buffer1() As Byte 'As String
Dim bytesLeft As Double
Dim lngPointer As Double
Dim tmpfile As String
Dim lResult As Long

' size of the buffer - increase as needed

ReDim buffer1(BUFFERSIZE - 1)

On Error GoTo ExitProc

'bytesLeft = FileLen(Source)
bytesLeft = gfso.GetFile(Source).Size
WriteFile = 0
' open the first file
fnum1 = FreeFile
Open Source For Binary As #fnum1

tmpfile = Destination + ".tmp"
' open the second file
fnum2 = FreeFile
Open tmpfile For Binary As #fnum2
lngPointer = 0

' read the entire files in chunks
BeginTransfer = Timer

Do While bytesLeft
' don't read more than the residual bytes
On Error GoTo ExitProc
If CancelFlag = True Then
Close #fnum1
Close #fnum2
WriteFile = 0
gfso.DeleteFile (tmpfile)
Exit Function
End If

If bytesLeft < BUFFERSIZE Then
'buffer1 = Space$(bytesLeft)
BUFFERSIZE = bytesLeft
ReDim buffer1(bytesLeft - 1)
End If

' read a bunch of bytes from both files
On Error GoTo Readerror
Get #fnum1, lngPointer + 1, buffer1
On Error GoTo WriteError
Put #fnum2, lngPointer + 1, buffer1
' exit if files don't match
On Error GoTo ExitProc
lngPointer = lngPointer + BUFFERSIZE 'Len(buffer1)
' evaluate how many bytes are left to read
bytesLeft = bytesLeft - BUFFERSIZE 'Len(buffer1)
txtTransfered.Text = CStr(CDbl(txtTransfered.Text) + BUFFERSIZE)

WriteFile = 1
GoTo ExitProc
Debug.Print Err.Description
Debug.Print Err.Description

If Err.Number > 0 Then
strErrorsIgnored = strErrorsIgnored & CStr(Err.Number) & ":" & Err.Description & vbCrLf
End If
On Error Resume Next

Close #fnum1
Close #fnum2
End Funciton

Thanking you


Optimization Question. Read Large Binary File -Best Way.
I have a two part question. Using VB6. I have Binary Files anywhere from 20-60 MB in size.
Speed wise....
Is it better to read the file completely into a buffer first and then loop through each byte? - OR -
Or is it faster to create a structure and use GET for each binary data record I wish to read and then parse into an array?

Also, if I do read every thing into a buffer and as I loop through it, what is the best way (Fastest) to convert 4 bytes (deep in the buffer) to a LONG type? Thanks for any advice!

Reading Large Binary Files (e.g. 100mb In Length)

I am trying to make a large file reader that pulls in data, converts it and writes it back to the same file. I have achieved this part, however the problem I now have is how to open large files in chunks.

At the moment, it is pulling in one byte at a time, result = half an hour for anything large to get done!

I was wondering if someone could provide me with code which can open up a large file and read in chunks of a size, lets say about 5 or 10kb a time (or larger if that proves more efficient) and I can then perform my code on the actual bytes individually once they are in an array inside the program.

Essentially, the code I am looking for is:

1) How to get large chunks of data each time.
2) Enter them into an array which allows sequential processing

The reason that I want this code is so that the operation can be performed quicker since as I explained above, it takes a long time reading just one byte at a time.

Thanks if anyone can help me.

Sending Binary Information Through Mscomm
Hi all, Does anybody knows how to send binary information, no text using mscomm, the help on VB says than I have to use a byte array and pass it to a variable of type variant. But it doesn't work.

Any idea ???

MSComm In Binary Input Mode
Hello all,

I am using an MSComm control and I expect a byte array
of fixed length (I am communicating with a hardware device
that has a streaming mode). I am trying to retrieve a value
which is a UINT and it resides in bytes 2 and 3. How do I do

Thanks to all

Passing Binary Value To Microcontroller Through MSComm Control
I am trying to send a value (Between 0 and 255) to the microcontroller using the MSComm control. For example if the intended value is 156, its Binary value should be reaching at the microcontroller serial input port. If I simply put 156, its ASCII is transfering. What should I do to transfer the Binary Values to microcontroller serial input.

Please help me. I don't have much experience with Comm Control.
Thanks in advance,

Displaying Packet Data
What is a good way to display packet data from a server without using an external program?

Can We Make Binary Compatability For A Component With MSCOMM Control?

i developed a component "Communication.dll" with MSCOMM Control.i kept version Compatibility as "Project Compatibility"

Its not working fine in Windows Vista. So i got to know changing the version compatibility to "Binary Compatibility " will resolve my i tried to Change the version Compatibility to "Binary Compatibility".

But it is showing that MSComm cannot be Compatible.

So can any one help me how i can resolve this issue? i am using vb6 for creating the components.

Thanks and Regards
Vinay Kumar

Convert Large Binary Files (3270 Exports) To Text File Format.
Access XP doesn't appear to import Binary files when exported directly from Attachmate.
Some of these files are quite large 18mb - to 100mb.

When I attempt to open the files in Access XP they fail and lockup Access XP. I have looked at the file format with some Hex compare utilities and they report that the file is 'Binary'.

If I take the same exact file and open it in Notepad then click save the file date and time changes and the file works perfectly with Access XP. (And the HEX compare utility no longer indicates that the file is binary)

Now that I am aware of this limitation - How do I take the file called XYZOutput.txt - open it in VB with FSO and write it back out as the same file name?

My theory was - If I can open the file in notepad - make NO CHANGES - but click 'SAVE' - the file structure changes from binary to text.

I have the following code to open the file and close it - but in VB it does not change the structure the way notepad.exe did?

One catch - the routine needs to handle large files, and since they are large I don't want to make a second file. I don't know what the file size limitation is of Notepad.exe. I want to fix the broken file. So for example - If my file is called "XYZOutput.txt" I want the VB routine to open this large file 'fix the formatting from binary to text' and save it.

'' Code ----------------------------------

    Dim fso As FileSystemObject
    Dim fil As File
    Dim ts As TextStream

    Set fso = CreateObject("scripting.filesystemobject")
    Set fil = fso.GetFile(sourcefile)
    Set ts = fil.OpenAsTextStream(ForAppending)
    Set fso = Nothing

Sending A Packet Of Data To A Known IP Address And Port
Is it possible to write a VB application which would packetise say name and password into a data packet, which could then be sent over the net to a certain IP address and port number?

MSCOMM Serial Port Data Capture And Manipulation Of Data
Dear frens,

I'm writing a VB project which will receive data from a device via
RS232. I have a few problems

1) First, I can use VB to capture the RS232 data but what i get is some
characters which i think should be ASCII characters whereas i can
capture the RS232 data with some " SERIAL MONITORING" software which
will display the data nicely in HEX, for eg
A1 23 FE 41 1C 43
My question is how can i convert the RS232 data i captured above to the
HEX i mentioned, ie A1 23 FE AI and etc...? I tried using HEX but what
it came out was a continuous stream of 0s... Any idea how?

2) The question 1) is the 1st stage of my project. The 2nd project is
to parse through the patterns of the HEX data and find more specific
patterns. For eg
(i) A1 B4
(ii) A2 34
(iii) 28 33

And then for each pattern i got, i need to set a bit of a data type of
16 bits. For example, if i get (i) A1 B4, i need to set the 1st bit of
that data type to 1
If i get (ii) A2 34, i need to set the 5th bit of that data type to 1

How can i search thru the RS232 data i mentioned above? I'm not very
clear of the data types and functions of VB because this is only my 2nd
month using VB.

Also, which data type is suitable for the "data type of 16 bits" i
mentioned above for the bit setting?

Any help is appreciated... Thank you very much.

Albert Leng

Mscomm Data Capturing And Saving Data Online To Adatabase
hai iam raheem,

i am new in vb .i am working as pabx technician.
I developed a program to capture the SMDR coming
from the pabx with the help of vbterminal(vb sample)
it capturing the data like the hyper terminal and it is showing in atext box line by line.Actually i want this
data to saved in to a database immediatly as it showing in the text box . can anybody help me for developing a program to do this . I have the sample
data captured from pabx.
********************************************************************** **********

Date Time T Ext CO Dial Number Ring Duration Acct code CC

********************************************************************** **********

02/06/06 10:51AM 1 E1001 T10601 9 00:00'00

02/06/06 10:52AM 1 E1001 T10601 9 00:00'02

02/06/06 10:53AM 1 E1001 T10501 <INCOMING> 0'05 NA

pls help me

How To Open Data Stored As Long Binary Data?
I searched this forum but can't find the answer, hope you can help me out.

I am using VB6 to retrieve records stored in SQL Server 2000. The information I want to retrieve stored as Long Binary Data. The binary they stored called Varbinary or Binary......
Is there a way that I can query out as text?
Thanks in advance for replies.

Saving Binary File When New Data Is Shorter Then Old Data?
I am having trouble saving a file with binary access when the current data is short than the old data. How do I remove the extra data from the file before writing my new data? I am currently using the following code:

VB Code:
FF = FreeFileOpen sFilePath For Binary Access Write Lock Read As #FFPut #FF, , sFileClose #FF

I have encountered this problem in the past and have never found a solution. Any ideas?

Large Amount Of Data
I have a class difining my data-structure, and multiple instaces stored in an ArrayList.
I need a fast and simple way to display this data in a table, with columns for each property of the class.

I've tried using a ListView, but I can't figure how to get the data directly into the ListView, without converting each property into a string and constructing a ListViewItem with all the strings.
Is there some sort ot MVC like design to feed the data into the view?

Data Too Large For Array.
I'm working on a pet project using a third party DLL. The DLL can take in a stream of data (as an array in VB) and process it for it's own purposes.

Here's the catch. I imagine the potential of having a huge block of data so large that it would be possible to exceed the limits of VB 5.0/6.0. Intial tests using very large files seem to indicate that is the case.

Any clues on an alternative method? I'm thinking of tricking the DLL and handing it the reference to the file so the DLL can take the data straight off the hard drive. I'm sure performance would slow down a bit (a lot), but the memory limitation would be bypassed. And this method would be used in rare cases with ultra large blobs of data.

Given that, is it possible to obtain the address of the first byte of the file in question so I can pass it into the DLL? The DLL takes the array as a reference so I'd imagine that this is feasible.

Best Grid For Large Data?
Question, what is a really good grid component for large amounts of data.

I am creating an application in which the main screen will have 3 large grids on it. Only one is visible at any given moment. That is, if the user has a Customer in the tree on the left highlighted, then the grid on the right pane would show all open orders. Problem is, there could easily be thousands of them at any one time.

Once the user changes from customer-to-customer, I need to refresh the grid with the orders for that particular customer.

What grid provides the best performance (I have dbGrid) for just filling up the grid a screen at a time so there is not much lag time? Know what I mean? Something that only grabs data when it needs to perhaps?

Back end right now is SQL server, but the app will really work with any OLE DB provider.

Large Sample Data Set
Does anyone know where I can find a free, large (preferably over million-record) database? I've got several questions about performance within SQL Server that I'd like to test and was hoping for an existing set of data.

Large Varchar Data
I'd like to put a "notes" section on a VB form, using a multi-line textbox (or richtextbox) and store the data in a SQL Server 7.0 database as a large varchar column. According to MSDN, varchar columns can hold up to 8000 characters. Is there any reason I should avoid doing this? Note that for the most part my users won't enter more than a few sentences, and the varchar column will NOT be used in any search criteria. Also, I'm expecting around 20,000 records, but as I mentioned, the average length of a note would be a few hundred characters (Quick calculation: 20,000 records * 300 Characters/records * 1 byte/character = 6000000 bytes ~ 5860k ~ 5.7 mb)

Show Various Data In Large Box?
I need to take an access table and show all the information easily

in the link the sample window on the right, the upper box is kinda what I want
so how do I set up something like that?

Large Data Volume
The company that I work for is kind of small but we deal with large data sets. For example, we read in dissimilar data into one similar format (SQL 2k). The data that we deal with is retrieved from CD, using an app created in VB 6, moved into a staging database using DTS (called by the VB app). Some of these CDs contain about 1.5 million records. Once the data is in the staging database a stored procedure is fired (from the VB app), some calculations are done and the data is then moved into our "main" database. Sometimes this process can take up to 40 minutes. It seems to me there has to be a faster way of moving this data. I know that there are larger companies moving much larger data sets alot faster than this. From what I understand DTS is not an option because of replication issues. Is there anyone here that deals with large amounts of data that may have a better solution or option? Also, if linked servers were added to the configuration, how would this affect the time?

Large Data Set Manipulation
I am trying to select one field from several tables and then create all possible combinations in a new table. There should be approximately 1.5 million combinations possible. I don't seem to get any performance gain whether I use SQL to do the calculations in SQL server, or whether I use recordsets and looping to do it programatically. The calculation always ends up failing with a low memory error after about 10 minutes.

One question I have: how can Excel do this calculation instantly and without any problems? Seems like I must be overthinking this one.

The main goal is to take a random subset of all possible combinations, say 200 or so (based on conditions). I was going to create all the possible combinations, assign each one a random number, then sort by the random field and take the top 200. Is there a better approach?

How Can I Call Large Data
Hi VBCity Friends,

I am using VB6+SQLServer2000
i am using following command

Code:cmd.commandtext="Select '101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201' as Fld1 int NewTable

this command is working fine. but when call the data from newTable
it is displying upto about 255 digits (the above data total about 400 digits.

How can show all data?
Please help me


Large XML Data In DataBase
Hey All,

I have these XML files that are big (anywhere from 150k - 500k). I need to parse them out and store their contents in a SQL Server DB. I need some advise on the best way to store this information. ie. what field types should I use, how large can I go with a single field, Should I store parent nodes along with their child nodes in the same field, and anything else I should know?

Any advise would be great!!


~Of all the things I've lost, I miss my mind the most.~
~Iz vseh veshei chto ya poteryal, ya bol'she vsego skuchayu po rassudku.~

Large Data Storage

I am using MS Access to store my data and one of the fields is the memo field, which is capable of storing 65k bytes of data. What are the methods of inserting and deleting these large fields, as I believe the normal insertion and deletion SQL statements are only for the manipulation of 255 bytes of data. Thanks a lot!


Extracting Data From Large Files
Say I have a file 700 MB large and the data I want to extract (32768 bytes) is somewhere within the first 20 MB (but also, keeping in mind that the possibility the data is not in the file at all). With me knowing the first 20 or so characters in the data I want extracted what method would you suggest extracting said data?

My current method of course is the only method I've known to try is opening it as Binary and converting it to unicode. I've never used buffers because I've never seen the need for it as I've never needed them.

Copyright 2005-08, All rights reserved